summaryrefslogtreecommitdiff
path: root/src/shared_string.cc
AgeCommit message (Collapse)Author
2024-08-12Move debug utils to debug.hh/debug.ccMaxime Coste
Lots of code includes buffer_utils.hh just for write_to_debug_buffer which pulls many unnecessary dependencies. Reorganise to reduce compile times.
2024-02-28Templatize StringData::createMaxime Coste
This improves performance by letting the compiler optimize most use cases where string count and length are known are compile time.
2024-02-28improve :debug shared-stringsMaxime Coste
2023-11-17Improve WordDB performance by precomputing hashesMaxime Coste
Avoid multiple computation of string hashes by making it possible to pre-compute and pass hashes to interned strings and hash maps.
2022-08-21Avoid calling memcpy from empty string viewsMaxime Coste
ubsan is unhappy when passing a nullptr as the source pointer to memcpy even if the length is 0. Fixes #4720
2018-07-26Fix shared string registry ref count statsMaxime Coste
2017-10-10Move all non-core string code to string_utils.{hh,cc}Maxime Coste
2017-06-07Use range based accumulate wrapper instead of std::accumulateMaxime Coste
2017-03-07Replace uses of UnorderedMap with HashMapMaxime Coste
2017-02-23Refactor StringData and StringRegistry to remove need for purgingMaxime Coste
Purging unused strings could get pretty expensive with a lot of interned strings as it requiered iterating on all of them. Use a flag on the refcount of the StringData to see if the string is interned, and notify the StringRegistry in this case. This should improve the speed of editing big files with many words, such as the one described in #1195
2016-02-05dont intern SharedStrings but StringDataPtrMaxime Coste
2015-06-06Move write_debug to buffer utils as write_to_debug_bufferMaxime Coste
2015-04-16Use an UnorderedSet for string registryMaxime Coste
2015-03-30Replace various adhoc operator+ based formatting with format funcMaxime Coste
2015-01-19rename SharedString::Storage to StringStorage and use directly in BufferMaxime Coste
2015-01-19Use a single allocation for SharedString::StorageMaxime Coste
2015-01-18Replace std::shared_ptr with homemade, intrusive, ref_ptrMaxime Coste
That saves a lot of memory as sizeof(SharedString) is now one pointer less.
2015-01-15Replace InternedStrings with SharedString, shared_ptr basedMaxime Coste