Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/planetis-m/ssostrings
Small String Optimized (SSO) string implementation
https://github.com/planetis-m/ssostrings
datatype nim nim-lang optimization small-string-optimization sso string
Last synced: 3 months ago
JSON representation
Small String Optimized (SSO) string implementation
- Host: GitHub
- URL: https://github.com/planetis-m/ssostrings
- Owner: planetis-m
- License: mit
- Created: 2022-02-09T14:47:31.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-22T12:38:37.000Z (4 months ago)
- Last Synced: 2024-07-22T14:59:39.999Z (4 months ago)
- Topics: datatype, nim, nim-lang, optimization, small-string-optimization, sso, string
- Language: Nim
- Homepage:
- Size: 49.8 KB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: readme.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-nim - ssostrings - Small String Optimized (SSO) string implementation. (Text / String Types)
README
====================================================
Small String Optimized String
====================================================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.