Large-but-correctly-aligned-and-optimized code is faster than less-bytes-per-instruction/opcode-packed code

Is large-but-correctly-aligned-and-optimized code faster than less-bytes-per-instruction/opcode-packed code?
asked Jan 21, 2013 by anonymous

1 Answer

 
Best answer

Alex Ionescu mentioned in ros-dev mailing list:

I'm not sure why you would want kernel code to be "smaller" instead of "faster" though -- on modern processors for cases like interrupts and such, large-but-correctly-aligned-and-optimized code is faster than less-bytes-per-instruction/opcode-packed code. ie:
mov eax, [foo]
add eax, 1
mov [foo], eax
is faster than
inc [foo]
answered Jan 21, 2013 by anonymous

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...