[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: porting?



>> Actually, the Java VM only needs one optimisation to run well at those
speeds:
>> There's a 240-case switch statement in the main interpreter loop. Convert
it
>> to a jump table, and you gain _two_orders_of_magnitude speed increase.

BTW, the JVM seems to be a must, since there are interesting programs in the
Java out there. I've heard about htttpd or even WWW browser written fully in
Java. I'll check the Java source code if I could port it.

>Won't gcc do that that automatically with optimizations on?  Aren't
>those 240 cases cases of *byte*code (range 0-255) inctructions?
>
>I haven't checked this out, but if gcc really is that lame I'm

I don't know if gcc optimizes it automagically. But I know you can use

goto *table[index]

Petr
--
E-mail: stehlik@cas3.zlin.vutbr.cz                        PARCP developer
   WWW: http://cas3.zlin.vutbr.cz/~stehlik               MiNTOS/Linux user
mirror: http://users.zln.cz/~pstehlik                    Atari800 emulator
mirror: http://www.cyberstrider.org/mirrors/stehlik       Atari Falcon040