It wasn't very complicated, I just started from zero experience worrying about 
this stuff.

- switch map to loop+recur
- add primitive type hints to args and return values
- make sure you get the types right (e.g. make sure your longs are longs, not 
ints)

Cheers, Jay

On Mar 28, 2012, at 10:17 PM, endbegin wrote:

> On Tuesday, March 27, 2012 2:51:41 PM UTC-4, Jay Fields wrote:
> I recently ran into some code** that was in Java, and ran in single
> digit microseconds (not millis). I converted it to clojure, and got it
> running at about the same speed... though it did take me a day to
> figure out all the tweaks.
> It can be done, if you're willing to invest the time and learn the tricks.
> 
> Cheers, Jay
> 
> 
> 
> That is good to know. Is there a place where the tricks involved were 
> documented? As in, "here" is what you should think about to get Java-like 
> performance. I've seen fragments in different places, and a lot of them 
> applied to Clojure 1.2 or earlier. Based on what I have seen on Stack 
> Overflow, it seems like if you want Java performance, then you have dig down 
> into direct Java interop, and use things like Java arrays.
> 
> -- 
> 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 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

Reply via email to