HI, just wondering whether it would be a better idea to replace bullet list with bullet dict.
As a game session progresses, the bullet list is becoming larger. In theory, the penlty of the for loop also becomes larger.
Changing to dict may slightly improve the performance (according to my not-at-all-scientifc benchmark)
|
this._bulletList[i] = null; |
HI, just wondering whether it would be a better idea to replace bullet list with bullet dict.
As a game session progresses, the bullet list is becoming larger. In theory, the penlty of the for loop also becomes larger.
Changing to dict may slightly improve the performance (according to my not-at-all-scientifc benchmark)
jsbattle/packages/jsbattle-engine/src/engine/Simulation.js
Line 557 in 236afe2