DavidKinder / Git

Fast Glulx interpreter, originally written by Iain Merrick.
MIT License
46 stars 13 forks source link

Performance optimizations #4

Closed pdewacht closed 9 years ago

pdewacht commented 10 years ago

So I've been looking at the Git source code and found a couple of things that could be improved. For a scripted play-through of Counterfeit Monkey release 4 I get the following results on my laptop (Intel Core 2 Duo in 64 bit mode on Linux):

The first few patches actually just fix various things that GCC and/or clang complain about. The optimization changes follow. None of the patches make large changes to the code, they mostly nibble away at small inefficiencies at the edges. The core of the compiler/interpreter is rather inscrutable :)

DavidKinder commented 10 years ago

Thanks for all this work. I am currently busy with other projects, but I will get around to working through these at some point.

DavidKinder commented 9 years ago

HI Peter, I have finally got round to looking at these, and I've included all your patches, except for "Optimized memory access code." I wasn't entirely happy about this one as I am unsure as to what GCC version introduced the byteswap intrinsic, and I find that older GCCs still give much better performance on straight C code - on my system git compiled with GCC 2.95 is about 30% faster than when compiled with GCC 4.8.