Speed up programs by modifying assembly code

  • Thread starter Thread starter sasa
  • Start date Start date
S

sasa

Is there a program that can speed up your *.exe, dll files
by optimizing the assembly code. Like commands mov ax,0 and
xor ax,ax both do the same thing but the second is much
faster...and deletes nop which doesn't do anything but
takes processor time..
It is not a big boost in speed for many programs but for
some it is much. I know a guy who manually did this and
boosted the speed of some video codec by 200%...
 
Hi,

It's basically up to the programmer to optimize code at the assembly
language level. The assembler merely translates the code into machine
language "as written". Speeding up an existing .exe file would mean
decompiling it, optimizing the code (and by the way, I believe the two
instructions you listed have difference of only one or two machine cycles,
so the difference in timing is in the single digit nanosecond range, and
with modern superscalar-structured cpu's this is nearly meaningless), then
reassembling it. This is not something to be done by the home user,
especially in the world of multi-person coding teams.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Associate Expert - WindowsXP Expert Zone

Windows help - www.rickrogers.org
 
Quick answer is no. You might want to check out what the assembly group has
to say about that though.
 
sasa said:
Is there a program that can speed up your *.exe, dll files
by optimizing the assembly code. Like commands mov ax,0 and
xor ax,ax both do the same thing but the second is much
faster...and deletes nop which doesn't do anything but
takes processor time..
It is not a big boost in speed for many programs but for
some it is much. I know a guy who manually did this and
boosted the speed of some video codec by 200%...

I remember that Intel had a toolkit that was used to optimize
code for the P4 architecture. It was supposed to be good
enough for you to observe the speedup. I can't remember the
name of it but you might search the vast Intel website and
see if you can find it.
 
Back
Top