Mercurial > lbo > hg > leveldb-rs
view README.md @ 387:2ac6eedcc9dc
db_impl: Use a BufWriter inside LogWriter
Unbuffered write-a-lot with 32768 entries written, first four iterations on a new DB:
usr=0.32 sys=0.12 elap=0.46
usr=0.47 sys=0.12 elap=0.60
usr=0.59 sys=0.11 elap=0.72
usr=0.50 sys=0.15 elap=0.67
Buffered write-a-lot with 32768 entries written, first four iterations on a new DB:
usr=0.22 sys=0.01 elap=0.24 (delta = -0.1/-0.11/-0.22)
usr=0.43 sys=0.03 elap=0.48 (delta = -0.04/-0.09/-0.12)
usr=0.54 sys=0.05 elap=0.62 (delta = -0.05/-0.06/-0.1)
usr=0.42 sys=0.03 elap=0.47 (delta = (-0.08/-0.12/-0.2)
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Mon, 09 Oct 2017 05:51:43 +0000 |
parents | f3d44aa3fbdf |
children | bbbf5ebea758 |
line wrap: on
line source
# leveldb-rs **Goal:** A fully compatible implementation of LevelDB in Rust. The implementation is very close to the original; often, you can see the same algorithm translated 1:1, and class (struct) and method names are similar or the same. ## Status * User-facing methods exist: Read/Write/Delete; snapshots; iteration * Compaction is supported, but no manual ones. * Fully synchronous: Efficiency gains by using non-atomic types, but writes may occasionally block during a compaction. * Compatibility: Not yet assessed. ## Goals Some of the goals of this implementation are * As few copies of data as possible; most of the time, slices of bytes (`&[u8]`) are used. Owned memory is represented as `Vec<u8>` (and then possibly borrowed as slice). * Correctness -- self-checking implementation, good test coverage, etc. Just like the original implementation. * Clarity; commented code, clear structure (hopefully doing a better job than the original implementation). * Coming close-ish to the original implementation; clarifying the translation of typical C++ constructs to Rust.