Sure, absolutely - there's nothing like profiling to see what's actually
going on and his recommendation seems sound either way, I just thought the
information was interesting.
On 11 August 2015 at 23:44, Zach Tellman wrote:
> It's fluid, but the output that Norman uses in his post (and that
> m
There's code splits like that in Clojure's RT.java too - things like seq() and
seqFrom() have the same intention. We have run into cases where we blew the
inlining budget and performance was affected.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
It's fluid, but the output that Norman uses in his post (and that motivated
the changes to Aleph) were from the JVM explicitly saying "I would have
inlined this, but it was too big". That may not be true under other
circumstances, but you're only helping by factoring out uncommon, large
code b
That's a really interesting post, thanks for that. I actually cornered
Cliff Click at Curry On because I was interested in knowing how well the
JVM inlined var indirection. The short answer is "it's complicated". But if
the JVM does inline your method, then the var indirection shouldn't cost
you as
The inlining part is explained very well by this blog
post http://normanmaurer.me/blog/2014/05/15/Inline-all-the-Things/
As for why I left all the repetition in there, I tend to let code expand
before getting annoyed and compacting it. Sometimes there's a commit
between those two events, somet
Reid, thank you. I think you answer half the question. You make a good
point about giving the JVM a way to better optimize a hot path. I think you
are right about that. But, given the large amount of repetition between
"chain'-" and "chain-" I'm wondering why this wasn't done with a macro?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Lawrence,
This is just a theory, but in the interests of response time, the JVM
uses a large number of heuristics to determine what optimizations will
likely prove profitable. One of them is a budget for method size. I
would guess that lifting this
I'm always interested in anything Zach Tellman does, though I don't always
understand it.
I see that he defines a function twice, via (let), of which he
says "factored out for greater inlining joy". Does anyone know what he
means by that? Can anyone suggest a reason why this was more conveni