flat assembler
Message board for the users of flat assembler.
Index
> Main > please help me to understand |
Author |
|
vid 24 Jan 2006, 20:29
i think parts you omited (...) were important in this case. What is code for? Two codes you posted do different things, they are not functionaly equivalent
|
|||
24 Jan 2006, 20:29 |
|
Nikolay Petrov 24 Jan 2006, 21:06
And I thought the same as you...
When i create some proc or part from proc i tested with well-known program(see TSCTest32.zip) When i saw this method(lea eax,[eax]), for the first time in "lzo" decompress algorithm, i did revision of my standart used procs, and the results ware very intresting, but i don't understand why this happens(in 90% of the cases - standart used("IO", str and other) procs and macros are faster, not only in my computer)
|
|||||||||||
24 Jan 2006, 21:06 |
|
Reverend 29 Jan 2006, 15:22
lea eax, [eax] doesn't do anything but it aligns the following label and so the processor can read it faster. That's one of the basic rules of optimization - alignment.
EDIT: Example: Code: ; first code 00: jmp labe1 02: 02: label1: 02: nop ; second code 00: jmp label1 02: lea eax, [eax] 04: 04: label1: 04: nop |
|||
29 Jan 2006, 15:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.