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

Optimize: Test large equivalence classes for conflict first.

This reduces the execution time of gperf on large inputs by ca. 10%.

* src/search.cc (cmp_equiv_classes): New function.
(compute_partition): Sort the equivalence classes according to
decreasing size.
This commit is contained in:
Bruno Haible
2025-04-19 19:57:12 +02:00
parent 9e29799ac3
commit 70899c856b
2 changed files with 30 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
2025-04-19 Bruno Haible <bruno@clisp.org>
Optimize: Test large equivalence classes for conflict first.
This reduces the execution time of gperf on large inputs by ca. 10%.
* src/search.cc (cmp_equiv_classes): New function.
(compute_partition): Sort the equivalence classes according to
decreasing size.
2025-04-19 Bruno Haible <bruno@clisp.org>
Refactor: Use an array-list instead of a linked-list of equiv.-classes.