After following Jason's suggestion to use BigInteger and .multiply
instead of BigInt and * I too am getting speed on par with Java (108-109
miroseconds on my RPI). Therefore, I consider this issue closed.... :)
@Stuart
thanks for running the benchmark yourself...maybe I could have save you
some time if I had posted my new results late last night...I was about
to conclude that 'nothing beats a for-loop' but it seems that loop/recur
is equally fast.
Jim
On 03/07/13 01:33, Stuart Sierra wrote:
Hi Jim,
I cannot reproduce your results. I see Clojure and Java with similar
performance when they are both using java.lang.BigInteger. Clojure's
arbitrary-precision integer defaults to clojure.lang.BigInt, which in
my test is about 12% slower than java.lang.BigInteger.
See https://gist.github.com/stuartsierra/5914513 for my code and
results. I did not use Criterium or Leiningen to run the benchmark.
-S
On Tue, Jul 2, 2013 at 2:05 PM, Jim - FooBar(); <jimpil1...@gmail.com
<mailto:jimpil1...@gmail.com>> wrote:
I'm really sorry for coming back to this but even after everything we
learned I'm still not able to get performance equal to java in a
simple
factorial benchmark.
--
--
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
---
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.