Anyone have experience or links on whether pattern matching is faster or slower than virtual method dispatch on modern JVMs?
@pchiusano I remember @djspiewak had opinions on this, but I have found dispatch to be faster (not much). Usually best to leave to JVM.
-
-
@tixxit@pchiusano In fact, a lot of micro optimization in data structures on the JVM involves converting pattern matching to dispatch. -
@djspiewak@pchiusano Does this apply to > bimorphic? I remember that bimorphic calls were much faster, but returns diminished after. - 1 more reply
New conversation -
-
-
@tixxit@pchiusano Virtual method dispatch is much much faster. The same in the worst case, and the best case is nearly straight line. -
@djspiewak@tixxit I am inclined to believe this (also seems true from my informal profiling), but do you have evidence I can look at? - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.