logoalt Hacker News

lemmingtoday at 12:20 AM2 repliesview on HN

Great article, as always.

There is one thing that I think is important to bear in mind when discussing inlining, especially in the context of Clojure. This is that once a function has been inlined, you can no longer update the definition of that function in the REPL and have that update the behaviour of functions which use it, unless you recompile those as well. This is not a criticism of course, it’s just part of the natural tension between dynamism and performance.


Replies

thfurantoday at 1:22 AM

Does that not happen automatically? I know there are contexts in which jvm will deoptimize inlining and recompile, like in response to class loading that causes a call site that was previously provably monomorphic to no longer be.

show 1 reply
sieabahlparktoday at 12:54 AM

[dead]