was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

32 Visitors Online


 
...das höherwertige Wort (High-Word) eines 32Bit Wertes extrahieren?
Autor: Martin
[ Tip ausdrucken ]  

Tip Bewertung (6):  
     


The HiWord function retrieves the high-order word
from the given 32-bit value.

Instead of using HiWord(var32)

use: Word(var32 shr 16)

this is over 60% faster then calling HiWord() function.
Don't make procedure or function out of it (you'll kill the speed).

You could use Word(var32) over LoWord(var32)
but it's less then 1% faster.

********

Die HiWord Funktion extrahiert die das höherwertige Wort (Word) von einem
gegebenen 32-bit Wert.

Anstelle von HiWord(var32)
Verwende: Word((var32 shr 16)

Dies ist über 60% schneller als die HiWord() Funktion

Man könnte auch Word((var32) anstatt LoWord((var32) aber dies
ist weniger als 1% schneller.

 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners