For example,We have a DWORD = $12345678
Which of the instructions would 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;
Specifically,I’m asking what exactly ‘absolute’ does,because if it doesn’t use additional memory to write that byteArray then I have no reason to use Move instead of absolute in that case so how does ‘absolute’ work?
absolute does not perform any operation; it declares the address of a var to be the same as another var.
Move() performs a copy operation, which takes some time.
With absolute, both vars are stored at the same address, your second declaration stores the vars at different locations.