Skip to content
Snippets Groups Projects
Select Git revision
0 results

operators.c

  • Per Hedbor's avatar
    ed2beda0
    [performance] Some tweaks to stralloc to improve performance · ed2beda0
    Per Hedbor authored
    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).
    ed2beda0
    History
    [performance] Some tweaks to stralloc to improve performance
    Per Hedbor authored
    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).