On 02/17/2011 10:46 AM, Charles Oliver Nutter wrote:
FWIW, I'm interested in any and all tech for improving startup of
JVM-based stuff. Current Hotspot simply does not start fast enough to
be used for command-line utilities, even though it has been improved.
It's not because of the boot-time stuff anymore, but now cold
performance comes into play. For commands that only run for a couple
seconds, running cold (at many times slower than hot) just isn't
acceptable.
It doesn't seem that bad for Kawa:
$ time java -Xbootclasspath/a:kawa-1.11.jar kawa.repl \
-e '(define (plus a b) (+ a b))' \
-e '(format "Sum: ~d~%" (plus 2 3))'
Sum: 5
real 0m0.207s
user 0m0.186s
sys 0m0.037s
This loads Kawa, compiles and loads a function named plus, and then
compiles and loads an expression that invokes that function followed
by printing the result (a la printf). In both case we do a full
compile-to-bytecode, including analysis and optimization passes.
So a fair number of classes get loaded and used.
This is on an old (2008/8) T400 laptop.
Of course this is still way slow compare to say /bin/sh:
$ time /bin/sh -c '/bin/ls -ld .'
drwxr-xr-x. 21 bothner bothner 4096 Feb 10 11:39 .
real 0m0.008s
user 0m0.002s
sys 0m0.005s
--
--Per Bothner
[email protected] http://per.bothner.com/
--
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en.