4 ms·
The JVM is very fast to start on my machines. For Java 7 on Linux x86_64: t:~% time java HelloWorld Hello from Java! java HelloWorld 0.04s user 0.02s s
by sterwill 14y ago
The JVM is very fast to start on my machines. For Java 7 on Linux x86_64:
t:~% time java HelloWorld
Hello from Java!
java HelloWorld 0.04s user 0.02s system 94% cpu 0.063 total
It's not as fast as C or Ruby, but who cares about .063 seconds spent once at start-up?
t:~% time ./hello
Hello from C!
./hello 0.00s user 0.00s system 0% cpu 0.002 total
t:~% time ruby hello.rb
Hello from Ruby!
ruby hello.rb 0.00s user 0.00s system 86% cpu 0.009 total
- democracy 14y agoHow about the same test with a '-client' switch...
- sterwill 14y agoI get the same times, more or less. I'm not sure the -client switch changes any behavior that early in the VM's life, before any garbage collection or sizable allocation happens. It would still be using a 64-bit data model with the -client switch (-d32 gives me: "Error: This Java instance does not support a 32-bit JVM.").
- astrange 14y ago"-client" has no effect in 64-bit.