Skip to content

perf: implement letter based skip index for token blocks#461

Open
cheb0 wants to merge 1 commit into
mainfrom
0-token-block-zone-maps
Open

perf: implement letter based skip index for token blocks#461
cheb0 wants to merge 1 commit into
mainfrom
0-token-block-zone-maps

Conversation

@cheb0

@cheb0 cheb0 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Using 30 bits per table entry: 26 for eng letters, 2 for utt-8 ru letter bytes, 1 bit for digits, 1 bit for the rest.

Largely depends on data store in a database, but some real world installations can get these numbers

Query env cold, ms   hot, ms   cold (branch), ms   hot (branch), ms   cold diff hot diff
message:*content* prod 211.61 ±4.78 35.31 ±0.18 155.99 ±2.62 15.21 ±0.19 -26.3% -56.9%
message:*аннуляци* prod 154.65 ±5.02 16.48 ±0.17 81.47 ±2.67 3.09 ±0.27 -47.3% -81.3%
message:*applicationexception* prod 131.17 ±6.44 14.3 ±0.11 85.19 ±3.52 5.93 ±0.27 -35.1% -58.5%
message:*3645320973434* prod 133.99 ±5.37 19.47 ±0.16 139.56 ±8.21 19.27 ±0.16 4.2% -1%

  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🔴 Performance Degradation

Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.

Show table
Name Previous Current Ratio Verdict
Not/size=10000-4 25381c 45af0f
4.51 ns/op 5.40 ns/op 1.20 🔴
NotEmpty/size=1000-4 25381c 45af0f
4.53 ns/op 5.04 ns/op 1.11 🔴
Or/size=1000000-4 25381c 45af0f
4.27 ns/op 4.75 ns/op 1.11 🔴

@cheb0 cheb0 force-pushed the 0-token-block-zone-maps branch from fc6355f to 7409cdc Compare July 9, 2026 08:05
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🔴 Performance Degradation

Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.

Show table
Name Previous Current Ratio Verdict
BucketClean-4 25381c f25e66
40994.00 ns/op 45644.00 ns/op 1.11 🔴
MutexListAppend-4 25381c f25e66
199.21 MB/s 173.31 MB/s 0.87 🔴
80797744.00 ns/op 92317994.00 ns/op 1.14 🔴

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.58824% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.59%. Comparing base (25381c2) to head (7409cdc).

Files with missing lines Patch % Lines
util/letters_bitset.go 87.87% 4 Missing ⚠️
frac/sealed/token/table_loader.go 70.00% 2 Missing and 1 partial ⚠️
cmd/index_analyzer/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
+ Coverage   70.51%   70.59%   +0.08%     
==========================================
  Files         232      233       +1     
  Lines       18268    18339      +71     
==========================================
+ Hits        12881    12946      +65     
- Misses       4426     4432       +6     
  Partials      961      961              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants