Opened 7 years ago

Last modified 3 years ago

#4347 new task

[PATCH] change internals of EntityMap

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

Description (last modified by Stan)

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).

Attachments (1)

patch.patch (31.0 KB ) - added by wraitii 7 years ago.

Download all attachments as: .zip

Change History (5)

by wraitii, 7 years ago

Attachment: patch.patch added

comment:1 by elexis, 7 years ago

Milestone: Alpha 22Work In Progress

Moving to the new WIP milestone.

comment:2 by Imarok, 7 years ago

Keywords: review removed

This review is now taking place in https://code.wildfiregames.com/D8

comment:3 by Stan, 4 years ago

Description: modified (diff)
Patch: Phab:D1739

comment:4 by Silier, 3 years ago

Keywords: patch removed
Owner: set to wraitii
Note: See TracTickets for help on using tickets.