From 4d70f73c7b609d8d336b1a2a7d88ceeb0679984f Mon Sep 17 00:00:00 2001 From: supercmmetry Date: Wed, 16 Dec 2020 13:09:01 +0530 Subject: [PATCH] chore(git): update benchmarks on readme Signed-off-by: supercmmetry --- .gitignore | 1 + README.md | 10 +++++----- benchmarks/benchmark.cpp | 2 +- src/bitio.h | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 92a0f73..5b9989a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ cmake-build-debug +cmake-build-release .idea release \ No newline at end of file diff --git a/README.md b/README.md index 7717070..ad75c3e 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ A simple and fast bitio library for C++ ## Benchmarks: -This benchmark was taken on Arch Linux (x86_64), Intel i7-9750H with a 128 KB bitio buffer. +This benchmark was taken on Arch Linux (x86_64), Intel i7-9750H, 1TB HDD (SATA 7200rpm) with a 128 KB bitio buffer. | Operation | Speed (Megabytes per second) | | ----------- | ----------- | -| Read | 10.4 | -| Write | 7.5 | -| Seek (SEEK_CUR) | 4.8 | -| Seek To (SEEK_SET) | 167.6 | \ No newline at end of file +| Read | 10.5 | +| Write | 6.7 | +| Seek (SEEK_CUR) | 6.1 | +| Seek To (SEEK_SET) | 58.6 | \ No newline at end of file diff --git a/benchmarks/benchmark.cpp b/benchmarks/benchmark.cpp index 8cad693..6cf08cd 100644 --- a/benchmarks/benchmark.cpp +++ b/benchmarks/benchmark.cpp @@ -52,7 +52,7 @@ void benchmark(bitio::stream *stream) { // Seek_to operations start = clock.now(); - for (int i = 0; i < 1024; i++) { + for (int i = 0; i < 1048576; i++) { stream->seek_to(i); } auto seek_to_pass_1 = clock.now() - start; diff --git a/src/bitio.h b/src/bitio.h index 0381402..238200a 100644 --- a/src/bitio.h +++ b/src/bitio.h @@ -7,7 +7,7 @@ #include #include -#define BITIO_BUFFER_SIZE 0x400 +#define BITIO_BUFFER_SIZE 0x20000 namespace bitio { const uint64_t u64_sblmasks[] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800,