--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
Everybody may already know this, but the JVM only takes 64mb for the
heap by default. You'll get an out of memory error if your program
uses more than that. In contrast, python just takes all the memory it
needs. As your program gets closer to the JVM memory limit it'll spend
more and more time doing garbage collection, with less and less real
work getting done. You can pass an -Xmx flag to give java access to
more memory, which many (most?) programs do.
2012/4/13 Alex Robbins <alexander...@gmail.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 post to this group, send email to clo...@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
> 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 post to this group, send email to clo...@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
--László Török
And not sure if this is faster, (maybe it's slower), but you can spell the
function you pass to reduce more succinctly:
(fn [G [v1 v2]] (update-in G [v1] (fnil conj []) v2))
Robert
On Thu, Apr 12, 2012 at 06:22:34PM -0400, David Nolen wrote:
> How much memory do Python & Go consume when you do this? Are you giving the
> JVM enough memory?
>
> > L�szl� T�r�k
Thanks, I know about transients, but I'm already using mutable arrays for speed :-)
On Apr 13, 2012 8:01 PM, "Robert Marianski" <r...@marianski.com> wrote:
>
> If the jvm does have enough memory, you may want to try building up the
> map using a transient.
>
> And not sure if this is faster, (maybe it's slower), but you can spell the
> function you pass to reduce more succinctly:
>
> (fn [G [v1 v2]] (update-in G [v1] (fnil conj []) v2))
>
> Robert
>
> On Thu, Apr 12, 2012 at 06:22:34PM -0400, David Nolen wrote:
> > How much memory do Python & Go consume when you do this? Are you giving the
> > JVM enough memory?
> >
> > > László Török