
Originally Posted by
theunknownguy
And you my bitch guy that think:
PUSH 2 is compiler optimization



Achieves the same as:
Code:
push ebp
mov ebp, esp
mov eax, NumberOfVariables ;Number of variables you have
imul eax, eax, DWORD ;Initialise each variable to 4 bytes
add esp, eax
mov [esp], 1 ;Lets put a variable with value 1
pop edx ;Restore it on EDX
mov [esp+4], 1 ;Next variable with value 1
pop eax ;Restore on EAX
add eax, edx ;1+1 is so simple has knowing you are a noob
push eax ;Push it for save into stack
And I've seen quite a few times where an optimizing compiler goes that far. So yes, it is.
[ame=http://en.wikipedia.org/wiki/Compiler_optimization]Compiler optimization - Wikipedia, the free encyclopedia[/ame]
Learn something.