perf(gamememory): Remove unnecessary overhead from GameMemory allocator function overloads - #3266
perf(gamememory): Remove unnecessary overhead from GameMemory allocator function overloads#3266xezon wants to merge 6 commits into
Conversation
PR Summary by QodoReduce GameMemory allocator override overhead
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Source/Common/System/GameMemory.cpp | Optimizes global allocation and deallocation paths, adds sized deletes, and preserves pre-main initialization through an inline fast-path and no-inline implementation. |
| Dependencies/Utility/Utility/CppMacros.h | Defines NOINLINE using compiler-supported attributes while leaving legacy MSVC to the locally scoped pragma fallback. |
| Core/GameEngine/Source/Common/System/GameMemoryNull.cpp | Adds sized delete implementations, removes redundant extern specifiers from definitions, and makes freeBytes non-throwing. |
| Core/GameEngine/Include/Common/GameMemory.h | Updates the allocator contract to noexcept and declares sized scalar and array delete overloads. |
| Core/GameEngine/Include/Common/GameMemoryNull.h | Keeps the null allocator declarations consistent with the optimized GameMemory interface. |
Reviews (2): Last reviewed commit: "perf(gamememory): Remove unnecessary cal..." | Re-trigger Greptile
Code Review by Qodo
1. Exiting after a replay save can crash
|
…r from delete and free functions and make freeBytes noexcept to get rid of EH frame (#3266)
79a1e9e to
3a3b027
Compare
Merge with Rebase
This change provides a number of small optimizations to the GameMemory to reduce computation overhead in its various new, delete, malloc, free overrides.
Performance impact was not measured, because it will likely be very small, but allocators are very hot functions so it will be good to make them cheaper.
AI use
All code changes were applied by hand, but assisted by Claude Opus 5 for ideas and verification.
TODO