Cost of a virtual function in a tight loop

前端 未结 4 1456
别跟我提以往
别跟我提以往 2021-01-18 20:09

I am in a situation where I have game objects that have a virtual function Update(). There are a lot of game objects (currently a little over 7000) and the loop calls update

4条回答
  •  广开言路
    2021-01-18 20:49

    another test with virtual, inline and direct calls you may find here [enter link description here][1] Virtual functions and performance - C++

提交回复
热议问题