• antirez's avatar
    SDS: New sds type 5 implemented. · 0ab27a45
    antirez authored
    This is an attempt to use the refcount feature of the sds.c fork
    provided in the Pull Request #2509. A new type, SDS_TYPE_5 is introduced
    having a one byte header with just the string length, without
    information about the available additional length at the end of the
    string (this means that sdsMakeRoomFor() will be required each time
    we want to append something, since the string will always report to have
    0 bytes available).
    
    More work needed in order to avoid common SDS functions will pay the
    cost of this type. For example both sdscatprintf() and sdscatfmt()
    should try to upgrade to SDS_TYPE_8 ASAP when appending chars.
    0ab27a45
sds.c 37.1 KB