On Sat, Jun 26, 2010 at 6:56 PM, j-g-faustus <johannes.fries...@gmail.com>wrote:
> > On my machine this is about 4x slower than the shootout Java > implementation. Using Java as the baseline and comparing my local > results to the shootout timings, it puts Clojure 1.1 on par with > Erlang, Go and OCaml. > > On profiling I have a bunch of intCast(Object) and doubleCast(double) > totaling ~9% CPU time (no screenshot yet, sorry), I'll see if I can > eliminate them for a few percent improvement. > Which Hotspot and flags do you use? You could be more idiomatic and probably faster with 1.2's (definterface Body-ish (x[]..). x= ...) and the like with type annotations (or better with protocols, but they have no annotations yet, I think) and (deftype Body [x y ...] Body-ish ....). Object field access are a bit faster than array access on the jvm. (as a first try, you could mesure the difference with using the Body class from java and the main loop in clojure, to check where the difference comes from) Best regards, Nicolas. -- 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