https://github.com/jafingerhut/clojure-benchmarks/blob/master/collatz/collatz.clj-2.clj
which is a slight modification of one mentioned recently on the
Clojure group.
When run on Clojure 1.3 alpha4 it takes about 200 times more CPU time,
and generates and collects about 500 times more garbage, than when run
on Clojure 1.2. I've been using AOT compilation, and input values
like 30,000, 100,000, and 1,000,000. The factors on time and garbage
generated are similar for those 3 values. 1.3 alpha3 is very similar
to alpha4, and 1.3 alpha1 seems worse in that it often fails by
running out of heap space for the same max heap sizes that alpha3 and
alpha4 succeed on.
Is this a known issue?
David Powell mentioned in this thread
that it is a known problem with the Clojure compiler, and "it seems to
only affect top-level defs". There are no top level def's in the code
linked above, except for a few function definitions. I don't know how
to determine whether this is the same problem David mentions.
Would it be worth filing a ticket to track this?
Thanks,
Andy
Hi,
I recently raised an issue, and posted a patch about the top level defs thing:
http://dev.clojure.org/jira/browse/CLJ-726
However, that isn't the problem here.
The slow down is caused by the new primitives work causing even? to make a reflective call. I've updated an old issue and posted a patch for this:
http://dev.clojure.org/jira/browse/CLJ-380
--
Dave
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To post to this group, send email to cloju...@googlegroups.com.
To unsubscribe from this group, send email to clojure-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/clojure-dev?hl=en.
The reflection was in clojure not in your code, so you'd only see it if you were compiling Clojure itself. And I think Clojure legitimately uses reflection in some places.
I believe that there is some work under way to develop performance regression tests.
Also the 1.3 branch is still in development, so things probably just aren't finished yet.
--
Dave