Will
take more time to process thanCode:int i = 10000000;
i++;
?Code:int i = 0;
i++;
Printable View
Will
take more time to process thanCode:int i = 10000000;
i++;
?Code:int i = 0;
i++;
No.
They will both compile down to
andCode:push 1000000
inc [%%sp]
Code:push 0
inc [%%sp]
IMO both your assembly variants are unlikely. The OP's code shows no reason to push the int at all because it's not going to be passed as a function parameter.
I'd say discussing assembly details here is moot anyway and not really helpful to the OP... ;)
EDIT: Ok, I need to take back my statement about no need to push the int as the variable is just being constructed. :o Looks like I wrote the post too quickly. But the second paragraph still holds true IMO...