No flame war here, just healthy discussion. :) I don't mean to over-state
the benefit; I have not yet found a program where var invocation was
actually the bottleneck and in general a lot of these differences are noise
compared to the real meat of the code.
On Wednesday, August 6, 2014 7:13:01
I didn't want to start a flame war, I just didn't want people being misled
into thinking static vars are a big perf improvement for most code. It's
better do use ordinary dynamic vars unless you're sure it will be
beneficial for some tight loop somewhere. The usual case is the JIT inlines
the v
I've compared the hotspot inlining on current vars through volatile
reference, lazy vars ala fastload branch, and static calls ala direct
branch and indeed the inlining is affected once things get hot. fastload
avoids early loads but is ultimately slower. direct is about twice as fast
due (I th
I think that also implies that the JVM can't inline across the fences, so
there's another cost.
On Wed, Aug 6, 2014 at 3:42 PM, Mike Thvedt wrote:
> I don't want to question your microbenchmarks, but I'm not sure you have
> the correct interpretation.
>
> Read memory fences have little to no co
I don't want to question your microbenchmarks, but I'm not sure you have
the correct interpretation.
Read memory fences have little to no cost. In particular, read memory
fences are a no-op (literally) on x86 unless the cache line is invalidated.
On Wednesday, August 6, 2014 5:54:32 AM UTC-5, R
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
Last sentence should be: "I've replaced vars with Java methods in some
high-performance cases 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/
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
Perfect explination, thanks!
kl. 20:41:56 UTC+2 onsdag 6. august 2014 skrev Reid McKenzie følgende:
>
> Functions are objects implementing the IFn interface. This interface
> defines a set of methods named "invoke" which return an object given up to
> 21 arguments. Once the compiler is done em
Functions are objects implementing the IFn interface. This interface
defines a set of methods named "invoke" which return an object given up
to 21 arguments. Once the compiler is done emitting any given function,
an IFn object has been created. Def is a general operation which creates
a value and
Don't understand the compiler that well. Could you provide a short
description of what is being done?
kl. 13:05:40 UTC+2 onsdag 6. august 2014 skrev Jozef Wagner følgende:
>
> See this WIP branch https://github.com/clojure/clojure/tree/direct
>
> On Wednesday, August 6, 2014 12:54:32 PM UTC+2, Ro
See this WIP branch https://github.com/clojure/clojure/tree/direct
On Wednesday, August 6, 2014 12:54:32 PM UTC+2, 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 i
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 abo
13 matches
Mail list logo