Is "absolute" faster than Move ()?

For example, we have DWORD = $ 12345678

Which of the instructions will be faster - absolute or Move ()?

var a:DWORD = $12345678;
    b:Array[0..3] of byte absolute a;


var a:DWORD = $12345678;b:Array[0..3] of Byte
begin
  Move(a,b,4);
end;

In particular, I ask what exactly the “absolute” does, because if it does not use additional memory to write this Array byte, then I have no reason to use Move instead of the absolute in this case, since the “absolute” works

+5
source share
4 answers

absolute does not perform any operation; it declares the address of var the same as another var.

Move () performs a copy operation, which takes some time.

Absolutely both varnas are stored at the same address, the second declaration stores the vars in different places.

+18

"" , . , , , Move .

+9

"" - , "A" DWORD PByte : PByte (@A) ^ [0]: = 3, PByte (@A) ^ [1]: = 4 .. ( ) DWORD -. Pascal - , ( ABSOLUTE) .

+6

""?

. ()

+1

All Articles