On the effect of branch mispredictions in the Squeak VM
John M McIntosh
johnmci at mac.com
Mon Jul 7 18:31:11 UTC 2003
> Just curious: Do you "gnuify" the VM before compiling it[*]? The above
> looks
> as if you might still be using the switch-based dispatch (in which case
> there should be no difference between the two versions as the branch
> prediction will _always_ be wrong no matter how you arrange the
> bytecodes).
Ooops. Ok, here are the numbers from CodeWarrior version (os-9) for
3.5.2b1 It's not gnuified
and the declare reads like so
int interpret(void) {
register struct foo * foo = &fum;
int localHomeContext;
char* localSP;
char* localIP;
int currentBytecode;
int localReturnContext;
int localReturnValue;
so everything is left up to the code warrior compiler to decide.
10 0 0
100 0 0
1000 1 1
10000 11 10
100000 104 109
1000000 1032 1025
10000000 10282 10207
10 0 0
100 0 1
1000 1 1
10000 11 9
100000 111 100
1000000 1025 1020
10000000 10261 10198
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|