I'm running it as a script with: java -server -cp clojure.jar clojure.lang.Script mandelbrot.clj
as I mentioned earlier, I did try forcing all the primitives, but didn't notice much of a difference, I did try running the draw method repeatedly to make sure it wasn't just the startup times causing it to run slow. as a note I also tried a jython version and it runs about twice as fast for me, which I think is comparable, and it could just mean that there is a hit on performance over java that only so much can be done about. I'm mostly curious if I made any newbie mistakes that would cause it to perform a lot worse than it should. I do expect pure java to run faster in the end. On Apr 1, 10:49 pm, Stuart Sierra <the.stuart.sie...@gmail.com> wrote: > On Apr 1, 9:40 pm, Dmitri <dmitri.sotni...@gmail.com> wrote: > > > I've been playing around with rendering a mandelbrot set, and using > > pure java it renders about 2 seconds on my machine, however it runs > > about 10 times as slow in clojure, I was curious if I'm doing anything > > obviously wrong, or if it's just life :) I do run it with the -server > > flag, which does improve it a bit. I've got the java and clojure > > source below: > > Are you running the Clojure source as a script on the command line? > Some of the delay may be Clojure starting up and parsing the script. > > You should also try using primitive types in the loops. See this > thread for > details:http://groups.google.com/group/clojure/browse_thread/thread/61f236e83... > > -Stuart Sierra --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---