Laziness is great when there are things that may not ever be needed. But it slows things down when you know that you are going to need some function applied to every element of some col. The doall function is your friend in this case.
If there are things that you are using pmap on then I would open up a systems console that let's you see the load being placed on each processor, and see if there are areas of the code that aren't using all of the cores fully. (This works a lot better on my core i7 processor at home, than it does on the dual core processor at work.) I would than start applying doall to each of the map and pmap commands and figure out what is causing the slow down. With a judicious use of doall I have seen a 10-20 fold speed increase in some of my code. On Feb 13, 5:50 pm, Jarl Haggerty <jarlhagge...@gmail.com> wrote: > For a while I've been working on a 2D physics engine written in > Clojure. I just recently got to the point where I can run a > simulation(a box falling onto the ground) and it is painfully slow. > I'm shooting for 60 fps but I can barely get 10 when the box is > falling and when it lands on the ground and the collision response > kicks in I get about 5. > > The project has reached a size where I thought it would be silly to > ask for specific ways to speed up but I thought I could at least ask a > general question. > > I have heard that Clojure is not suited for programs that need to run > in real time, is that true? -- 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