Re: Clojure Speed performance test

2011-08-22 Thread Isaac Gouy
On Aug 18, 7:34 am, Michael Jaaka wrote: > For list reduction it is said to remove every third solder but just > with 1 step they remove 1 soldier. There is something wrong Scully. The author knows, and says that "variant" seemed more interesting. (It should be easy enough to factor out the d

Re: Clojure Speed performance test

2011-08-22 Thread Isaac Gouy
On Aug 18, 6:50 am, David Nolen wrote: > The Clojure code posted there is pretty awful and shows a gross, gross > misunderstanding of Clojure data types. I submitted one improved version > already, but didn't spend the time to make it really, really fast. > > For this particular kind of pointles

Re: Clojure Speed performance test

2011-08-22 Thread artg
Below is a Clojure solution that runs in 8.58 microseconds on my machine. I only did it for the 40, 3 case. Records are linked. The list reduction solution runs in 23.4 and the element recursion in 27.3 --art (defrecord Soldier [val r]) (def v (vec (map #(Soldier. % (inc %)) (range 40 (def v2

Re: Clojure Speed performance test

2011-08-18 Thread Michael Jaaka
For list reduction it is said to remove every third solder but just with 1 step they remove 1 soldier. There is something wrong Scully. On Aug 18, 3:50 pm, David Nolen wrote: > The Clojure code posted there is pretty awful and shows a gross, gross > misunderstanding of Clojure data types. I submi

Re: Clojure Speed performance test

2011-08-18 Thread David Nolen
On Thu, Aug 18, 2011 at 7:40 AM, Paulo Pinto wrote: > Maybe Clojure code needs some type annotations. Type annotations will not help this code at all. David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Re: Clojure Speed performance test

2011-08-18 Thread David Nolen
The Clojure code posted there is pretty awful and shows a gross, gross misunderstanding of Clojure data types. I submitted one improved version already, but didn't spend the time to make it really, really fast. For this particular kind of pointless benchmark it's not hard to get identical Java per

Re: Clojure Speed performance test

2011-08-18 Thread Paulo Pinto
Maybe Clojure code needs some type annotations. On Aug 18, 9:40 am, Roberto Mannai wrote: > Hello, > I recently stumbled upon this > page:http://java.dzone.com/articles/contrasting-performance > They are comparing several languages (Java, Scala, Python, Erlang, > Clojure, Ruby, Groovy, Javascrip