The Small String Optimized (SSO) string data-type attempts to reduce the number of heap allocations that happen at runtime. If a string is less than 23 bytes on 64bit it can be stored directly in the object, avoiding a dynamic allocation. There exist two modes for each String, a short string - and a long string mode in which the dynamic memory is managed using Nim's destructors. The implementation is based on clang's std::string class. This technique might improve runtime performance and reduce fragmented memory where this is most needed i.e. on embedded systems.
-
Notifications
You must be signed in to change notification settings - Fork 3
Small String Optimized (SSO) string implementation
License
planetis-m/ssostrings
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Small String Optimized (SSO) string implementation
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published