Skip to content
Snippets Groups Projects
Commit ed2beda0 authored by Per Hedbor's avatar Per Hedbor
Browse files

[performance] Some tweaks to stralloc to improve performance

Increased the hash-size significantly.

It now aims for one strings per bucket instead of 4.

Changed to only have one short_string block allocator.  The wide short
strings are simply fewer characters long now.

Also, do not re-order the chains in findstring.

Update the flags in realloc_shared_string so the code does not have to
be duplicated in the two places the function is used.

Changed the switch to if/else in low_set_index.

This made that function about 3x faster, at least when setting indices
in narrow strings (the case that is now first, and was previously last
in the if/else gcc generated).
parent 698e603e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment