about summary refs log tree commit diff
path: root/README.md
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-03-01T16·31+0200
committertazjin <mail@tazj.in>2021-03-01T21·09+0000
commitef7a0da8cb22601d8cdd466644413877126c70df (patch)
tree82efc70429434293452f717c36e5d5f77bbcf533 /README.md
parent6f600c8300c028beb07bf224baf7dfdaa6490fd3 (diff)
feat(tazjin/rlox): Add a simple string interner r/2259
This is based on this matklad post:

https://matklad.github.io/2020/03/22/fast-simple-rust-interner.html

It's modified slightly to provide a safer interface and slightly more
readable implementation:

* interned string IDs are wrapped in a newtype that is not publicly
  constructible

* unsafe block is reduced to only the small scope in which it is
  needed

* lookup lifetime is pinned explicitly to make the intent clearer when
  reading this code

Change-Id: Ia3dae988f33f8e5e7d8dc0c1a9216914a945b036
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2578
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions