From: Keith Gaughan Date: 2006-07-29T05:42:26+09:00 Subject: Re: For performance, write it in C - Part 2, comparing C, Ruby and Java On Fri, Jul 28, 2006 at 08:33:23PM +0900, Pedro C?rte-Real wrote: > On 7/28/06, Peter Hickman wrote: > >Interesting, so just how to you run a Java program without the JVM > >start-up time? > > You can time it inside java by fetching the system clock before and after. > > >And if you can't run a Java program without the JVM start-up then your > >point is what exactly? > > It makes sense to do that for long running applications but in this > case it doesn't. If what you really wanted to do was calculate this > latin squares thing then the startup time matters. Are there any JVMs > around that keep a shared daemon running for all processes to share so > as to avoid some of the startup time? It also makes sense to run the algorithm a few times to ensure the JIT compiler gets the hint that it's supposed to convert the bytecode to native code. Otherwise you're only getting how quickly the bytecode interpreter can interpret the code rather than the raw speed of the code. -- Keith Gaughan - kmgaughan@eircom.net - http://talideon.com/ TAURUS (Apr.20 - May 20) Take advantage of this opportunity to get a little extra sleep, because you're going to miss the bus again today anyway. You will decide to lose weight today, just like yesterday.