Inheritance was invented as a performance hack (2021)
1–10 of 252 posts
Re: Inheritance was invented as a performance hack (2021)
#2I guess it could simplify the GC but modern garbage collectors have come a long way.
Re: Inheritance was invented as a performance hack (2021)
#3Huh, I was always told that inheritance hurt performance as it requires additional address lookups. Thats why many game engines are moving away from it. I guess it could simplify the GC but modern garbage collectors have come a long way.
I am kind of amused they _removed_ first-class functions though!
Re: Inheritance was invented as a performance hack (2021)
#4Re: Inheritance was invented as a performance hack (2021)
#5Huh, I was always told that inheritance hurt performance as it requires additional address lookups. Thats why many game engines are moving away from it. I guess it could simplify the GC but modern garbage collectors have come a long way.
The designers of StarCraft ran into the pitfalls of designing a sensible inheritance hierarchy, as described here (C-f "Game engine architecture"): https://www.codeofhonor.com/blog/tough-times-on-the-road-to-...
Re: Inheritance was invented as a performance hack (2021)
#6Huh, I was always told that inheritance hurt performance as it requires additional address lookups. Thats why many game engines are moving away from it. I guess it could simplify the GC but modern garbage collectors have come a long way.
Re: Inheritance was invented as a performance hack (2021)
#7Huh, I was always told that inheritance hurt performance as it requires additional address lookups. Thats why many game engines are moving away from it. I guess it could simplify the GC but modern garbage collectors have come a long way.
Simple inheritance makes the class hierarchy complicated through issues like the diamond inheritance problem, which C++ resolves in typical C++ fashion: attempt to satisfy everybody, actually satisfy nobody. The designers of StarCraft ran into the pitfalls of designing a sensible inheritance hierarchy, as described here (C-f "Game engine architecture"): https://www.codeofhonor.com/blog/tough-times-on-the-road-to-...
Re: Inheritance was invented as a performance hack (2021)
#8Favorite part of this is that I had no idea if this article was going to be about biology, code or money. I love a good surprise
Re: Inheritance was invented as a performance hack (2021)
#9Huh, I was always told that inheritance hurt performance as it requires additional address lookups. Thats why many game engines are moving away from it. I guess it could simplify the GC but modern garbage collectors have come a long way.
Re: Inheritance was invented as a performance hack (2021)
#10All that makes a lot of sense if it was introduced as a performance hack rather than a thoughtfully designed concept.