mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
1e2aae8095
The idea is to avoid std::map lookup for each CellRef. Instead generate a sequence of added and removed RefNums into a vector then order them by RefNum using a stable sort that preserves relative order of elements with the same RefNum. RefIDs are stored in a different vector to avoid std::string move ctor calls when swapping elements while sorting. Reversed iteration over added and removed RefNums for each unique RefNum is an equivalent to what map-based algorithm produces. The main benefit from sorting a vector is a data locality that means less cache misses for each access. Reduces ESMStore::countRecords perf cycles by 25%. |
||
---|---|---|
.. | ||
algorithm.hpp | ||
barrier.hpp | ||
budgetmeasurement.hpp | ||
constants.hpp | ||
convert.hpp | ||
coordinateconverter.hpp | ||
endianness.hpp | ||
frameratelimiter.hpp | ||
guarded.hpp | ||
hash.hpp | ||
helpviewer.cpp | ||
helpviewer.hpp | ||
mathutil.hpp | ||
messageformatparser.cpp | ||
messageformatparser.hpp | ||
objectpool.hpp | ||
resourcehelpers.cpp | ||
resourcehelpers.hpp | ||
rng.cpp | ||
rng.hpp | ||
stringops.hpp | ||
thread.cpp | ||
thread.hpp | ||
timer.hpp | ||
utf8stream.hpp | ||
weakcache.hpp |