1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Optimize: Make Bool_Array take less memory.

Less memory means: less cache misses.
This reduces the execution time of gperf on large inputs by ca. 2.5%.

* src/bool-array.h (Bool_Array): For the _storage_array and
_iteration_number fields, use 'unsigned char' instead of 'unsigned int'.
* src/bool-array.icc (Bool_Array::Bool_Array, Bool_Array::clear: Update.
* src/bool-array.cc (Bool_Array::~Bool_Array): Update.
This commit is contained in:
Bruno Haible
2025-04-19 15:00:14 +02:00
parent b52ad8ef32
commit 43fa5ebcb7
4 changed files with 18 additions and 8 deletions

View File

@@ -1,3 +1,13 @@
2025-04-19 Bruno Haible <bruno@clisp.org>
Optimize: Make Bool_Array take less memory.
Less memory means: less cache misses.
This reduces the execution time of gperf on large inputs by ca. 2.5%.
* src/bool-array.h (Bool_Array): For the _storage_array and
_iteration_number fields, use 'unsigned char' instead of 'unsigned int'.
* src/bool-array.icc (Bool_Array::Bool_Array, Bool_Array::clear: Update.
* src/bool-array.cc (Bool_Array::~Bool_Array): Update.
2025-04-19 Bruno Haible <bruno@clisp.org>
tests: Add unit test with many keywords.