1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-25 13:26:38 +00:00
openmw/components
elsid 1e2aae8095
Use stable sort+unique to collect RefIDs for ESMStore records counting
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%.
2021-05-15 18:45:22 +02:00
..
bsa Fix MSVC's C4244 warnings 2021-05-12 10:34:40 +04:00
bullethelpers
compiler Fix MSVC's C4244 warnings 2021-05-12 10:34:40 +04:00
config
contentselector
crashcatcher Fix MSVC's C4267 warnings 2021-05-12 10:34:39 +04:00
debug
detournavigator Remove some superfluous includes in components/detournavigator 2021-05-14 20:45:59 +02:00
esm Merge pull request #3075 from akortunov/warnfix 2021-05-14 21:28:56 +02:00
esmterrain
fallback
files Fix MSVC's C4267 warnings 2021-05-12 10:34:39 +04:00
fontloader
interpreter Fix MSVC's C4267 warnings 2021-05-12 10:34:39 +04:00
loadinglistener
misc Use stable sort+unique to collect RefIDs for ESMStore records counting 2021-05-15 18:45:22 +02:00
myguiplatform Fix MSVC's C4244 warnings 2021-05-12 10:34:40 +04:00
nif Improve null root handling 2021-05-05 02:41:30 +03:00
nifbullet
nifosg use particle data for particle system quota 2021-05-14 10:52:19 -07:00
process
resource Merge branch 'DoNotSearchTwice' into 'master' 2021-05-13 17:11:57 +00:00
sceneutil Replace raw pointer by observer_ptr to avoid dangling pointer dereferencing 2021-05-15 15:23:28 +02:00
sdlutil
settings Support vectors in settings.cfg 2020-07-24 21:47:49 +02:00
shader
terrain Recreate a special case for IntersectionVisitor on QuadTreeWorld 2021-05-11 16:34:02 +04:00
to_utf8
translation
version
vfs
widgets Fix MSVC's C4267 warnings 2021-05-12 10:34:39 +04:00
CMakeLists.txt
doc.hpp