On 22 Oct 2013, at 20:20, David Nolen <dnolen.li...@gmail.com> wrote:

> On Tue, Oct 22, 2013 at 3:11 PM, Paul Butcher <p...@paulbutcher.com> wrote:
> Yeah - I have tried giving it more RAM without any effect on the timing 
> whatsoever. And I couldn't see the point of stopping people with less RAM 
> than that from being able to run it :-)
> 
> But without enough RAM most JVMs will thrash in GC when running that code.

Yes, of course. But as I said, I tried giving it more RAM (the same 12G as the 
Scala solution) and it made no difference whatsoever. In fact, YourKit shows me 
that, even after running for an hour (i.e. more than 10x longer than the Scala 
version takes to return the full solution) the Clojure version is still using 
less than 2G. Whatever is going on, it's not a result of a lack of RAM.

> Saying both run in less than a second is not particularly informative for the 
> small problems :) Does Scala take 4ms and Clojure takes 400ms on the small 
> problems? That's a big difference.


Yes, of course. But my experience with small problems has been that differences 
between execution time, especially when talking about runtimes as dissimilar as 
the Clojure and Scala runtimes, are meaningless. Those differences tend to have 
more to do with startup costs and the vagaries of when hotspot happens to 
optimise things than anything fundamental.

But you asked, so here it is:

For Clojure, the 3x3 problem takes 7ms and the 4x4 problem takes 78ms. For 
Scala, it's 15ms and 252ms respectively.

--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher

On 22 Oct 2013, at 20:20, David Nolen <dnolen.li...@gmail.com> wrote:

> On Tue, Oct 22, 2013 at 3:11 PM, Paul Butcher <p...@paulbutcher.com> wrote:
> Yeah - I have tried giving it more RAM without any effect on the timing 
> whatsoever. And I couldn't see the point of stopping people with less RAM 
> than that from being able to run it :-)
> 
> But without enough RAM most JVMs will thrash in GC when running that code.
> 
> Saying both run in less than a second is not particularly informative for the 
> small problems :) Does Scala take 4ms and Clojure takes 400ms on the small 
> problems? That's a big difference.
> 
> David
> 
> -- 
> -- 
> 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.

Reply via email to