On Friday, March 29, 2013 11:37:36 AM UTC+1, John Szakmeister wrote: > On Fri, Mar 29, 2013 at 5:49 AM, Mikera <mike.r.an...@gmail.com<javascript:>> > wrote: > > I decided to benchmark JVM startup again, in case of any doubt, and > because > > I see plenty of FUD on this issue. > > Okay. I pushed up a barebones example of a command line application > here: https://github.com/jszakmeister/barebones > > Really, it's just Clojure plus tools.cli, and a small snippet in main. > Running this 10 times, I'm seeing about 3.07s on my machine to > execute this example. I built in with "lein2 uberjar", and did: > > :: time java -jar target/barebones-0.1.0-SNAPSHOT-standalone.jar > {:faux bar, :help false} > Hello, World! > java -jar target/barebones-0.1.0-SNAPSHOT-standalone.jar 3.09s user > 0.28s system 186% cpu 1.804 total > > :: java -version > java version "1.6.0_43" > Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-10M4203) > Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode) >
Yes, you are involving Clojure startup here, which turns the tables altogether. This is far more work than just Java startup: all the namespaces must be initialized: all their def'd values calculated at runtime and assigned. Some of these may involve quite heavyweight service startup. This is the real issue in the Clojure startup story: it is not aggressively optimized towards zero startup time. It is a problem that carries over to other underlying implementations. -marko -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.