More on performance...
Feb. 12th, 2008 08:17 amhttp://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)
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)