Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
topiolli
· 6y ago · 0 comments
Cool. Is this due to "final" and the fact that the compiler can figure out the target at compile time?
Comments
[–]
MaulingMonkey
6y ago
One call site (the one that takes bar&) relies on the final to devirtualize. The other call sites merely rely on the compiler being able to determine the exact type involved at compile time to devirtualize.