Giter VIP home page Giter VIP logo

concache's Introduction

concache

Crates.io Documentation Build Status

This crate provides two implementations of fast, concurrent, shared hash maps.

Both implementations provide lock-free implementations that use lock-free linked list buckets. Memory is safely destructed and reclaimed using either crossbeam::epoch or a manual Quiescent-State-Based Reclamation implementation. See the [crossbeam] and [manual] module documentations respectively for further details.

Table resizing is not yet supported in either implementation, but the map will also never fill due to the linked implementation; instead, performance will decrease as the map is filled with more keys.

The crate was written by Aditya Saligrama and Andrew Shen while writing A practical analysis of Rust’s concurrency story as their 2018 project for MIT PRIMES.

Performance

We've run some benchmarks of concache against a standard Rust HashMap protected by a reader-writer lock, as well as against chashmap — a crate which provides "concurrent hash maps, based on bucket-level multi-reader locks". The benchmarks were run using the binary in benchmark/ on a 40-core machine with Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz CPUs.

The benchmark runs a number of reader and writer threads in tight loops, each of which does a read or write to a random key in the map respectively. Results for both uniform and skewed distributions are provided below. The benchmark measures the average number of reads and writes per second as the number of readers and writers increases.

Preliminary results show that concache performs well under contention.

Read throughput Write throughput

concache's People

Contributors

andrewtshen avatar saligrama avatar jonhoo avatar

Watchers

Jiayu Ye avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.