Hacker News new | ask | show | jobs
by sedachv 3449 days ago
Right, and how many game developers are recommending to "never use virtual functions because they are slow" in 2017? I remember seeing statements like that in Usenet posts and articles from the 1990s.
2 comments

Also, "never use virtual functions" is very different than "don't use virtual functions everywhere" Common wisdom is that virtual function usage in hot loops can become problematic.
https://shaneenishry.com/blog/2014/12/27/misconceptions-of-c... is from 2014. I tend to think it might actually make a difference in this case given it's a vtable indirection for every entity every frame (or for every subsystem * every subsystem tick).