On Monday, 9 April 2018 at 00:25:21 UTC, solidstate1991 wrote:
On Saturday, 24 February 2018 at 07:12:21 UTC, Guillaume Piolat
wrote:
From my experience a combination of the following is necessary:
- not having the audio thread registered
- using pools aggressively for game entities
Also you can save a lot of clockcycles if you put @nogc
everywhere you don't allocate on the heap, the stack will be
automatically cleaned up.
I'm currently thinking on restructuring the way my engine
handles display lists on sprites (dynamic array contains the
priority, multiple associative arrays for Coordinates, sprites,
attributes), however if enabling exception handling in @nogc
parts will enable associative array indexing, I'll just skip
the whole procedure, otherwise probably moving the whole thing
to rbtree.
Why... associative arrays? Wouldn't that become expensive when
you hit 1,000s, or 10,000's of objects, for something as tiny as
a coordinate (two or three floats) lookup?