hcstatic-str

Crates.iohcstatic-str
lib.rshcstatic-str
version0.1.1
sourcesrc
created_at2023-06-20 21:19:57.278435
updated_at2023-06-20 21:37:39.602541
descriptioncompact storage for short static strings
homepage
repository
max_upload_size
id895499
size6,409
Eric Stokes (estokes)

documentation

https://docs.rs/hcstatic-str

README

Hash Consed Static Short String Storage

This crate is for storing static short strings (up to 256 bytes) in as compact a way as possible. Instead of each string getting it's own allocation, and associated padding, header, etc, they are stored packed into 1 MiB allocations. The length is stored in the allocation, making the stack size of the Str type 1 word instead of the usual 2 for &str. Because the length is limited to 256 bytes only one extra byte is used in the heap allocation for the length.

Commit count: 0

cargo fmt