The .idx file (StarDict/dictd format) is just a flat, alphabetically-sorted list of variable-length entries — null-terminated word, then a 4-byte big-endian offset and 4-byte size into the .dict file. Because entries aren't fixed-width, you can't binary-search the raw file directly (you can't jump to "entry N" without scanning from the start, or doing random reads and heuristics), so a naive lookup means either loading the whole index into RAM or linear-scanning it block by block, which is slow on an SD card over an SPI interface.
The general goal is to minimize the number of 512B sectors read from the SD card to find a word, since SD card reads are significantly slower than RAM reads. We need to get as much value from each SD read as possible.
This benchmark builds and compares several small sidecar index structures (oft, cspt, base26, fence/fencec, fencep, tab) that let you binary-search a compact auxiliary table instead, narrowing down to a small byte ran