#hash-map #lock-free #atomic #garbage-collection #deadlock

papaya

A fast and ergonomic concurrent hash-table for read-heavy workloads

6 releases

0.1.6 Dec 2, 2024
0.1.5 Nov 30, 2024
0.1.4 Oct 14, 2024
0.1.3 Jul 31, 2024
0.0.0 Nov 10, 2021

#157 in Concurrency

Download history 17/week @ 2024-08-19 31/week @ 2024-08-26 17/week @ 2024-09-02 24/week @ 2024-09-09 60/week @ 2024-09-16 35/week @ 2024-09-23 15/week @ 2024-09-30 31/week @ 2024-10-07 379/week @ 2024-10-14 257/week @ 2024-10-21 221/week @ 2024-10-28 256/week @ 2024-11-04 323/week @ 2024-11-11 240/week @ 2024-11-18 750/week @ 2024-11-25 1119/week @ 2024-12-02

2,440 downloads per month
Used in 3 crates

MIT license

200KB
3.5K SLoC

papaya

crates.io github docs.rs

A fast and ergonomic concurrent hash-table for read-heavy workloads.

See the documentation to get started.

Features

  • An ergonomic lock-free API — no more deadlocks!
  • Powerful atomic operations.
  • Seamless usage in async contexts.
  • Extremely scalable, low-latency reads (see performance).
  • Predictable latency across all operations.
  • Efficient memory usage, with garbage collection powered by seize.

Performance

papaya is built with read-heavy workloads in mind. As such, read operations are extremely high throughput and provide consistent performance that scales with concurrency, meaning papaya will excel in workloads where reads are more common than writes. In write heavy workloads, papaya will still provide competitive performance despite not being it's primary use case. See the benchmarks for details.

papaya aims to provide predictable and consistent latency across all operations. Most operations are lock-free, and those that aren't only block under rare and constrained conditions. papaya also features incremental resizing. Predictable latency is an important part of performance that doesn't often show up in benchmarks, but has significant implications for real-world usage.

Dependencies

~105–265KB