[squeak-dev] Re: squeak profiling
Andreas Raab
andreas.raab at gmx.de
Sat Apr 19 18:34:43 UTC 2008
Levente Uzonyi wrote:
>> It seems to me that bytecodes cases in the interpret function
>> (in /platform/unix/src/vm/interp.c) are not ordered in respect to
>> the probability of their execution.
>
> Since the switch-case statement in C is compiled into a jump table
> (http://en.wikipedia.org/wiki/Jump_table) the order of the branches
> shouldn't affect the speed of execution (you can even start with the
> default branch).
In theory. In practice, the effect of branch-mispredictions can be quite
noticable:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2003-July/061996.html
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|