Opened 8 years ago

Last modified 3 years ago

#4347 new task

[PATCH] change internals of EntityMap — at Initial Version

Reported by: wraitii Owned by:
Priority: Should Have Milestone: Work In Progress
Component: Core engine Keywords:
Cc: Patch:

Description

EntityMap, our fast replacement for std::map<entity_id_t, V> was coded by RedFox. As such, it's weird. It uses a C-like buffer, and is generally not very nice.

Attached patch replaces all that with an std::vector and removes the "inline" everywhere and generally makes it nicer. Also adds a "start ID" information to avoid having a useless invalid member in front.

I also add tests (I believe I've got 100% coverage) and test performance.

(NB: the patch keeps the old entity map for purposes of performance comparisons (it's never worse, perhaps even better), obviously that would not get into svn).

Change History (1)

by wraitii, 8 years ago

Attachment: patch.patch added
Note: See TracTickets for help on using tickets.