pi_atom

Crates.iopi_atom
lib.rspi_atom
version0.2.6
sourcesrc
created_at2022-03-01 05:31:18.181262
updated_at2024-03-27 07:37:32.89685
descriptionThe global thread safe atomic string pool reduces the memory occupation of the same string and is also used for HashMap keys
homepage
repositoryhttps://github.com/GaiaWorld/pi_atom
max_upload_size
id541361
size13,630
dev (github:gaiaworld:dev)

documentation

README

pi_atom

全局的线程安全的原子字符串池,减少相同字符串的内存占用,也用于hashmap的键

如果全局该字符串最后一个引用被释放, 则该字符串会释放。

为了减少不停的创建和放入池的次数,高频单次的Atom,可以在应用层增加一个cache来缓冲Atom,定期检查引用计数来判断是否缓冲。

Commit count: 16

cargo fmt