2008-02-12

izard: (Default)
2008-02-12 08:17 am
Entry tags:

More on performance...

http://www.gtoal.com/sbt/ approach is nice but not generic, and adds another switch on the hot path (though I've tried this and it works). To be generic I really need profiling feedback and JIT or binary translation.
Cibyl approach is even better but I'll stick with mine code yet.
So the only generic way I can think of yet is the following:
I'm using int array for 128k of system memory, not byte array. So if there is no self modifying code in the hot paths (that I can determine using dynamic profiling), I can replace some common patterns with additional opcodes (and i can introduce plenty of them by just adding opcodes to switch table that makes no effect on common case performance)