1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Reuse and optimize sorting logic for List, SelfList, and HashMap

Added SortList class, and updated List, SelfList, and HashMap sort methods to use it.  Sorting is done with merge sort, with an initial check to optimize for already sorted lists, and sorted lists that were appended to.
This commit is contained in:
aaronp64
2025-04-18 22:10:26 -04:00
parent 1b37dacc18
commit 6b2674fe18
10 changed files with 309 additions and 190 deletions

View File

@@ -106,6 +106,7 @@
#include "tests/core/templates/test_oa_hash_map.h"
#include "tests/core/templates/test_paged_array.h"
#include "tests/core/templates/test_rid.h"
#include "tests/core/templates/test_self_list.h"
#include "tests/core/templates/test_span.h"
#include "tests/core/templates/test_vector.h"
#include "tests/core/templates/test_vset.h"