Giter VIP home page Giter VIP logo

rust-sketches-ddsketch's Introduction

sketches-ddsketch

This is a direct port of the Golang DDSketch quantile sketch implementation to Rust. DDSketch is a fully-mergeable quantile sketch with relative-error guarantees and is extremely fast.

DDSketch

  • Sketch size automatically grows as needed, starting with 128 bins.
  • Extremely fast sample insertion and sketch merges.

Usage

use sketches_ddsketch::{Config, DDSketch};

let config = Config::defaults();
let mut sketch = DDSketch::new(c);

sketch.add(1.0);
sketch.add(1.0);
sketch.add(1.0);

// Get p=50%
let quantile = sketch.quantile(0.5).unwrap();
assert_eq!(quantile, Some(1.0));

Performance

No performance tuning has been done with this implementation of the port, so we would expect similar profiles to the original implementation.

Out of the box we see can achieve over 70M sample inserts/sec and 350K sketch merges/sec. All tests run on a single core Intel i7 processor with 4.2Ghz max clock.

rust-sketches-ddsketch's People

Contributors

mheffner avatar danielnelson avatar tobz 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.