Skip to content

Commit dab9bdf

Browse files
committed
Improved red-black tree implementation in the map.
The performance of block_insert and block_find operations in rv32emu experiences significant improvements when replacing the original map with the proposed map implementation. The proposed map implementation shows significant improvements over the original version. The following data represents the average time of 20 experiments, each involving the insertion, finding, and deletion of 10 million randomly generated nodes in a random order. OpType | Insert (ns) | Find (ns) | Remove (ns) ---------+---------------+-------------+------------ original | 824,515,450 | 21,132,350 | 925,074,950 proposed | 535,518,250 | 10,032,300 | 602,755,100 improved | 35 % | 52 % | 35 % Heap memory usage also improved by 17 %. This map implementation has undergone extensive modifications, heavily relying on the rb.h header file from jemalloc. The original rb.h file served as the foundation and source of inspiration for adapting and tailoring it specifically for this map implementation. Therefore, credit and sincere thanks are extended to jemalloc for their invaluable work. Reference: https://github.com/jemalloc/jemalloc/blob/dev/include/jemalloc/internal/rb.h
1 parent 3a70492 commit dab9bdf

File tree

2 files changed

+546
-668
lines changed

2 files changed

+546
-668
lines changed

0 commit comments

Comments
 (0)