• KOBAYASHI Shuji's avatar
    Prioritize embedded string over nofree (or normal) string · a84ab127
    KOBAYASHI Shuji authored
    Prioritize embedded string in the following functions:
    
    - `str_new_static`
    - `str_new`
    - `mrb_str_new_capa`
    - `mrb_str_pool`
    
    The reasons are as follows:
    
    - Consistency with `mrb_str_byte_subseq` and `str_replace`.
    - Memory locality increases and may be slightly faster.
    - No conversion cost to embedded string when modifying the string.
    a84ab127
string.c 80.3 KB