al8n / stretto

Stretto is a Rust implementation for Dgraph's ristretto (https://github.com/dgraph-io/ristretto). A high performance memory-bound Rust cache.
Apache License 2.0
413 stars 28 forks source link

`re-stretto`: Implement a lightweight `stretto` and optimize the current implementation. #58

Open al8n opened 10 months ago

al8n commented 10 months ago

This crate was developed when I started learning Rust.

At the time, I did not have a deep understanding about:

  1. The difference between Rust and Go, in sync Rust, the thread model is one-on-one, so it is more expensive than Go's goroutine
  2. The contention of Mutex cannot be ignored.