News for hackers. Stuff that matters.
Re:The compiler will optimize that away by chromanoid on Monday May 03, 2021 @10:31AM (#27025555)
C++ is an issue for games. Most game engines implement a garbage collected script language (e.g. Lua, CLR, JavaScript...) to implement huge parts of game logic.
Re:The compiler will optimize that away by mort96 on Monday May 03, 2021 @05:38PM (#27031071)
They’re not implementing game logic in those languages for performance reasons though. The question, as I interpret it, is about why C++‘s performance isn’t an issue for games. Using those languages for scripting/game logic is a trade-off where performance is sacrificed for developer productivity.
Re:The compiler will optimize that away by chromanoid on Monday May 03, 2021 @06:30PM (#27031681)
You are right. I misunderstood the question.

I thought it was about the language as efficient tool not about performance. The Unreal engine is not even using data oriented design (at least for most parts), so I was assuming C++ sufficient efficiency was out of question. I agree with your argument, that the games would probably be faster. Game object processing is probably not the most pressing issue in games regarding performance, so I guess the impact would be not that visible (when talking about the stuff that is implemented in C++ in game engines).