Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's not quite what I said.

In languages like C++ or Rust you pay the cost every time the method is invoked. With other types of compiler you may not pay the cost even if the method is marked as virtual, even if it's actually used virtually in other parts of the codebase, due to call site specialisation.



The CPU branch predictor can predict/"specialise" virtual calls too.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: