On Aug 10, 2:19 pm, Jonathan Smith <jonathansmith...@gmail.com> wrote:
> 1.) use something mutable
> 2.) unroll all the loops (mapping is a loop)
> 3.) try not to coerce between seq/vec/hash-map too much.

Are you saying this w.r.t. my code or in general? If the former, be
specific, better yet, show us your code. I avoided (1) on purpose, as
I explained. The other choices I think are reasonable already. It
makes no sense to unroll a procedure that runs once, or macro-ify
something that gets inlined.

> in real world, stuff like the shootout is pretty useless, as generally
> you'd reach for a better algorithm rather than implementing the
> shackled, crippled, naive algorithms that the benchmark forces you to
> implement.

Some of us prefer facts and measurements, flawed as they may appear to
blind faith.

Many of the Shootout benchmarks are quite contrived, I agree, but the
N-Body benchmark is nice. I think it started elsewhere.

You'll have a hard time coming up with a better algorithm, unless you
are familiar with the field of numerical solutions of ordinary
differential equations. There are Runge-Kutta methods that can give a
constant factor speed-up, but they are just as easily implemented in
any other language.
--~--~---------~--~----~------------~-------~--~----~
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