An open API service indexing awesome lists of open source software.

https://github.com/cgbur/varint-benchmarking


https://github.com/cgbur/varint-benchmarking

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Benchmarks

## Table of Contents

- [Benchmark Results](#benchmark-results)
- [writing](#writing)
- [reading](#reading)

## Benchmark Results

### writing

| num_bytes | num_ops | ns_per_op_leb128_write | ns_per_op_varint_put | ns_per_op_varint_write |
| --------: | --------: | ---------------------: | -------------------: | ---------------------: |
| 1 | 100000000 | 1.13 | 1.04 | 1.11 |
| 2 | 100000000 | 1.76 | 1.42 | 1.21 |
| 3 | 100000000 | 2.4 | 1.56 | 2.24 |
| 4 | 100000000 | 3.07 | 1.99 | 2.24 |
| 5 | 100000000 | 3.74 | 2.22 | 2.68 |
| 6 | 100000000 | 4.42 | 2.43 | 2.9 |
| 7 | 100000000 | 5.05 | 2.64 | 3.32 |
| 8 | 100000000 | 5.7 | 2.86 | 6.12 |
| 9 | 100000000 | 8.6 | 2.84 | 6.13 |

encoding

### reading

| num_bytes | num_ops | ns_per_op_leb128 | ns_per_op_varint | ns_per_op_varint_read | ns_per_op_varint_read_buf |
|------------:|----------:|-------------------:|-------------------:|------------------------:|----------------------------:|
| 1 | 100000000 | 1.12 | 0.72 | 2.4 | 1 |
| 2 | 100000000 | 1.79 | 1.15 | 5.43 | 1.07 |
| 3 | 100000000 | 2.03 | 1.36 | 7.62 | 1.37 |
| 4 | 100000000 | 2.75 | 1.57 | 7.42 | 1.39 |
| 5 | 100000000 | 2.97 | 1.79 | 7.65 | 1.8 |
| 6 | 100000000 | 3.43 | 2.01 | 7.61 | 2.02 |
| 7 | 100000000 | 4.03 | 2.22 | 7.62 | 2.24 |
| 8 | 100000000 | 4.46 | 2.43 | 7.4 | 2.24 |
| 9 | 100000000 | 7.97 | 2.2 | 5.27 | 2.43 |

decoding