Hi Marshall,
  the megamorphic call site hypothesis does sound plausible but I'm not 
sure where the following test fits in.
If I understand correctly we believe that it's the fact that the base case 
(an PersistentList$EmptyList instance)
and the normal case (an PersistsentList instance) have different types and 
when run in paralell the interleaving
invocations are causing problems for the JIT but when we use a vector it's 
a single type so we see a better speedup.

I was toying with the idea of replacing the EmptyList class with a 
PersistsentList instance to mitigate the problem
in at least one common case, however it doesn't seem to help.
If I replace the reverse call in burn with the following code:
  #(reduce conj (list nil) %)
I get the same slowdown as we see if reverse (equivalent to #(reduce conj 
'() %))

where:
  (class '())        => clojure.lang.PersistentList$EmptyList
  (class (list nil)) => clojure.lang.PersistentList

I'm not convinced were at the bottom of it yet, perhaps the earlier post on 
memory contention by Carlos might
yield some clues. If the issue was related to memory access it might help 
explain why the impact differed
significantly between intel and amd hardware.

Cameron.

-- 
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