cosmopolitan/test
Steven Dee (Jōshin) 7e780e57d4
More ctl::string optimization (#1232)
Moves some isbig checks into string.h, enabling smarter optimizations to
be made on small strings. Also we no longer zero out our string prior to
calling the various constructors, buying back the performance we lost on
big strings when we made the small-string optimization. We further add a
little optimization to the big_string copy constructor: if the string is
using half or more of its capacity, then we don’t recompute capacity and
just take the old string’s. As well, the copy constructor always makes a
small string when it will fit, even if copied from a big string that got
truncated.

This also reworks the test to follow the idiom adopted elsewhere re stl,
and adds a helper function to tell if a string is small based on data().
2024-06-20 14:52:12 -04:00
..
ctl More ctl::string optimization (#1232) 2024-06-20 14:52:12 -04:00
dsp Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
libc Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
libcxx vim C++ filetype is still spelled "cpp" 2024-06-05 16:34:47 -07:00
math Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
net Refactor and improve CTL and other code 2024-06-04 05:45:48 -07:00
posix Add some noexcept annotations 2024-06-01 03:19:53 -07:00
tool Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
BUILD.mk Introduce Cosmopolitan Templates Library (CTL) 2024-06-03 09:21:59 -07:00