[Vm-dev] RoarVM: The Manycore SqueakVM

John M McIntosh johnmci at smalltalkconsulting.com
Sat Nov 6 21:00:32 UTC 2010

The other cheerful thing the switch statement does is put a range check in.  
This would cause a range check to be done for each bytecode looked up unless you did the gnuify. 
15 years back we actually altered the 68K binary to no-op out the range check which improved performance a 
measurable amount on.

On 2010-11-06, at 1:42 PM, Levente Uzonyi wrote:

> On Sat, 6 Nov 2010, Igor Stasenko wrote:
>> I suppose its related to fact, that with small number of cases (like up to 16)
>> its not worth using indirect jump, because with branch prediction you
>> can achieve same or even better performance.
>> That's why i think, modern compilers do not using jump tables.
>> Having more than 16 number of cases, is an edge case. Not saying about 256.
> I expect a compiler to generate the fastest possible code, if I ask for that. I think we agree, that gcc doesn't do this.
> Levente
>> Btw, I was also thinking that compilers generating jump tables for
>> case statements.

John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3829 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101106/0ca50bc9/smime-0001.bin

More information about the Vm-dev mailing list