Post #2044283
2026-04-15 18:24 UTC
Playing around with binary search in C#.
I have a JSONL file with 1,000,000 lines. Each line is a full JSON document, including a unique ID property.
Creating a binary index of these IDs takes less than one second. The position of the ID in the index corresponds to the line number of the data in the JSONL file.
Binary search of 1,000,000 numeric IDs takes 5-ish ms.
Then we have have the line number, and reading that line takes 250-ish ms.
Inspiration: https://www.dbpro.app/blog/do-you-even-need-a-database
Replies (0)
No replies.