nemasu / asmttpd

Web server for Linux written in amd64 assembly.
GNU General Public License v2.0
3.03k stars 199 forks source link

Made a few routines quicker #41

Closed GabrielRavier closed 4 years ago

nemasu commented 6 years ago

Hello!

Curious, how did you determine if the patches improve performance?

GabrielRavier commented 6 years ago

I just made a simple program that compared the speed of the routines ; my versions were ~40% quicker (mostly due to you pushing almost all registers at each call). Instructions like lodsb (who nobody uses anymore, thus they aren't made better by CPU manufacturers, thus nobody uses them, etc.) didn't help too

nemasu commented 6 years ago

Ah, I guess push/pop stack was a bad idea. I've been a bit busy lately, but I'll get around to this eventually.

triforce commented 5 years ago

Ah, I guess push/pop stack was a bad idea. I've been a bit busy lately, but I'll get around to this eventually.

I don't think it was a bad idea, in fact it just makes it easier to manage. When defining individual push/pop we need to be careful to preserve the stack.