At Tue, 27 Sep 2005 12:00:09 +1000, Bruce Badger wrote: > On 9/27/05, Erik de Castro Lopo <[EMAIL PROTECTED]> wrote: > > There are large classes of problems where running speed is an > > important issue. Static typing does make for faster run times > > and in cases where that moves your program from being too > > slow to being fast enough, that is not a premature optimisation. > > Modern VMs (e.g. many of the Smalltalk VMs) dynamically compile code, > i.e. they JIT. [...] > In fact, the very best of the JITing VMs can get performance that > exceeds that attainable by static compilation - because there is > more information available at run time to base the tuning decisions > upon.
If a program's use changes over its invocation, and the JIT continually shifts its optimisation targets, then I can see the potential benefit of this approach. I don't believe, however, that there are many programs that have this dynamic behaviour. You can gain the same runtime knowledge in a statically compiled C program by compiling with gcc's -ffprofile-arcs, running over some typical use cases (will write a bunch of .gcda files) and then recompiling with -fbranch-probabilities. -- - Gus -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
