On Aug 10, 11:42 pm, Jonathan Smith <jonathansmith...@gmail.com>
wrote:

> The way your code is setup, you will spend a lot of time in funcall
> overhead just because you used a lot of functions instead of doing the
> calculation in bigger chunks.

I thought, as I understood from Rich's lectures, JVM inlines whatever
it wants. Anyway, I put everything inside a LET. In my tests my normal
code (nbody_v2.clj) is 55x slower than Java, and yours is 40x slower.
Andy's transients-using and type-declaring version is 37x slower (in
his tests). After I put everything inside a LET, I get to be 52x
slower than Java. Definitely not worth it, considering how ugly it is.

Your version is not pure-functional, right? If so, I think I still
have the fastest pure-functional and non-type declaring version.

Let's just say that hacking Clojure's implementation of destructuring
is against the rules. If it were a good idea, I'm sure Rich would have
done it by now.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to