Var indirection is not super cheap, as it has a volatile field, which is a 
memory fence.  I have been working on Clojure with invokedynamic, and I 
have a demonstrable improvement on microbenchmarks.  Obviously your 
application will have IO and myriad other costs, but I just want to echo 
that it isn't a trivial cost.

On Wednesday, August 6, 2014 2:58:48 PM UTC-4, Mike Thvedt wrote:
>
> It's worth pointing out that var indirection is already cheap in Java--it 
> is generally dominated by IO, memory access, object construction, dynamic 
> dispatch... The JIT compiler will inline any var access if the var doesn't 
> visibly change, and only needs to check one word of memory per var each 
> time the JIT compiled function is invoked. I've replaced vars with Java 
> methods and found a 0% speedup.
>
> On Wednesday, August 6, 2014 5:54:32 AM UTC-5, Robin Heggelund Hansen 
> wrote:
>>
>> Just read this blog post about Oxen (
>> http://arrdem.com/2014/08/05/of_oxen,_carts_and_ordering/?utm_source=dlvr.it&utm_medium=twitter).
>>  
>> In it is mentioned that Rich is re-introducing invokeStatic to achieve a 
>> possible 10% performance increase for Clojure 1.7.
>>
>> I couldn't find any information about this. Anyone know where I can find 
>> out more?
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to