diff --git a/.gitignore b/.gitignore index 7194ea7..6c63614 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .cache +__pycache__ build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b0f69e..3545203 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/pre-commit/mirrors-clang-format - rev: 6d365699efc33b1b432eab5b4ae331a19e1857de # frozen: v18.1.2 + rev: 6d365699efc33b1b432eab5b4ae331a19e1857de # frozen: v18.1.2 hooks: - id: clang-format exclude: ".*third_party/.*" - repo: https://github.com/cheshirekow/cmake-format-precommit - rev: e2c2116d86a80e72e7146a06e68b7c228afc6319 # frozen: v0.6.13 + rev: e2c2116d86a80e72e7146a06e68b7c228afc6319 # frozen: v0.6.13 hooks: - id: cmake-format - repo: local @@ -13,7 +13,7 @@ repos: - id: debug verbose check name: disallow checking in DEBUG_VERBOSE=1 description: disallow checking in DEBUG_VERBOSE=1 - entry: '^#define DEBUG_VERBOSE 1$' + entry: "^#define DEBUG_VERBOSE 1$" language: pygrep types: [c++] - repo: local @@ -21,10 +21,18 @@ repos: - id: debug verbose check name: disallow checking in SHOW_MEMORY=1 description: disallow checking in SHOW_MEMORY=1 - entry: '^#define SHOW_MEMORY 1$' + entry: "^#define SHOW_MEMORY 1$" language: pygrep types: [c++] - repo: https://github.com/shellcheck-py/shellcheck-py - rev: a23f6b85d0fdd5bb9d564e2579e678033debbdff # frozen: v0.10.0.1 + rev: a23f6b85d0fdd5bb9d564e2579e678033debbdff # frozen: v0.10.0.1 hooks: - - id: shellcheck \ No newline at end of file + - id: shellcheck + - repo: https://github.com/psf/black + rev: 552baf822992936134cbd31a38f69c8cfe7c0f05 # frozen: 24.3.0 + hooks: + - id: black + - repo: https://github.com/pre-commit/mirrors-prettier + rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 + hooks: + - id: prettier diff --git a/README.md b/README.md index ab2cb13..779d6f1 100644 --- a/README.md +++ b/README.md @@ -58,27 +58,27 @@ Performance counters: ## Skip list -| ns/op | op/s | err% | total | benchmark -|--------------------:|--------------------:|--------:|----------:|:---------- -| 246.99 | 4,048,700.59 | 0.2% | 0.01 | `point reads` -| 260.16 | 3,843,784.65 | 0.1% | 0.01 | `prefix reads` -| 493.35 | 2,026,953.19 | 0.1% | 0.01 | `range reads` -| 462.05 | 2,164,289.23 | 0.6% | 0.01 | `point writes` -| 448.19 | 2,231,205.25 | 0.9% | 0.01 | `prefix writes` -| 255.83 | 3,908,845.72 | 1.5% | 0.02 | `range writes` -| 582.63 | 1,716,349.02 | 1.3% | 0.01 | `monotonic increasing point writes` +| ns/op | op/s | err% | total | benchmark | +| -----: | -----------: | ---: | ----: | :---------------------------------- | +| 246.99 | 4,048,700.59 | 0.2% | 0.01 | `point reads` | +| 260.16 | 3,843,784.65 | 0.1% | 0.01 | `prefix reads` | +| 493.35 | 2,026,953.19 | 0.1% | 0.01 | `range reads` | +| 462.05 | 2,164,289.23 | 0.6% | 0.01 | `point writes` | +| 448.19 | 2,231,205.25 | 0.9% | 0.01 | `prefix writes` | +| 255.83 | 3,908,845.72 | 1.5% | 0.02 | `range writes` | +| 582.63 | 1,716,349.02 | 1.3% | 0.01 | `monotonic increasing point writes` | ## Radix tree (this implementation) -| ns/op | op/s | err% | total | benchmark -|--------------------:|--------------------:|--------:|----------:|:---------- -| 19.42 | 51,483,206.67 | 0.3% | 0.01 | `point reads` -| 58.43 | 17,115,612.57 | 0.1% | 0.01 | `prefix reads` -| 216.09 | 4,627,766.60 | 0.2% | 0.01 | `range reads` -| 28.35 | 35,267,567.72 | 0.2% | 0.01 | `point writes` -| 43.43 | 23,026,226.17 | 0.2% | 0.01 | `prefix writes` -| 50.00 | 20,000,000.00 | 0.0% | 0.01 | `range writes` -| 92.38 | 10,824,863.69 | 4.1% | 0.01 | `monotonic increasing point writes` +| ns/op | op/s | err% | total | benchmark | +| -----: | ------------: | ---: | ----: | :---------------------------------- | +| 19.42 | 51,483,206.67 | 0.3% | 0.01 | `point reads` | +| 58.43 | 17,115,612.57 | 0.1% | 0.01 | `prefix reads` | +| 216.09 | 4,627,766.60 | 0.2% | 0.01 | `range reads` | +| 28.35 | 35,267,567.72 | 0.2% | 0.01 | `point writes` | +| 43.43 | 23,026,226.17 | 0.2% | 0.01 | `prefix writes` | +| 50.00 | 20,000,000.00 | 0.0% | 0.01 | `range writes` | +| 92.38 | 10,824,863.69 | 4.1% | 0.01 | `monotonic increasing point writes` | # "Real data" test