3 ms·
An array of pointers you call a virtual method on is indistinguishable in "pointer-chase" time (with current caches, at least), to an embedded linked list. Embe
by Jasper_ 7y ago
An array of pointers you call a virtual method on is indistinguishable in "pointer-chase" time (with current caches, at least), to an embedded linked list. Embedded linked lists have better insertion/deletion costs, and are easier to manage, so they're used quite frequently in games.
- jfkebwjsbx 7y agoThat model (bag of polymorphic objects) is avoided nowadays in everything from games to simulation software.