On 16/10/12 13:20, Michael Gardner wrote:
On Oct 16, 2012, at 5:16 AM, Jim foo.bar wrote:

so you're saying that if I write a for-loop in Java that populates an array 
with constants from 1-10000 and then a 2nd loop to add them up, it would happen 
at compile-time and i would get the same timing-result?
Maybe, maybe not. Compilers are very smart these days, but I don't know if they 
can fold complex expressions like for-loops.


I see... so Clojure macros could indeed have the advantage over regular Java methods with regards to my trivial example? I do understand that most of the times you simply don't have the data at compile time but there must be occasions where you do and replacing a complex expression with a scalar might provide stunning performance...I've not had the time to go back to the project of mine where performance really really matters but I will soon do and let you know if I find anything...

thanks again...

Jim

--
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