Review of #2380: on a language's own keys the strip asked the dictionary for every marked
spelling of each prefix (up to 256). Timed on the iPhone 17 simulator, iOS 27.2, 300
sentences each typed at key centres with marked letters typed plain: French alone went
from 2.88 ms to 7.54 ms a letter at the 95th percentile (15.2 ms at the 99th, up to 252
lookups a letter), Portuguese 2.95 -> 5.94 ms (260 lookups).
- A letter typed tries only the 8 spellings with the fewest marks (markedSpellings'
partial mode makes them in that order and stops), and leaves ranking by the guesses
(a slow call) to space.
- Space's fix (checkingWholeWord, wrapping cautiousReplacement in replacementOnSpace)
still tries up to 256 spellings (48 for a partner) and ranks them, as before: what space
puts in is unchanged. A letter's cached answer serves space only when it covered every
spelling.
- The strip's marked word is looked for only when the dictionary doesn't know the word as
typed, or it is two letters ("ze" still offers "że", "ou" "où").
- Whether a dictionary takes any letters is asked once per dictionary and language.
Measured (same 300 sentences, origin/dev 90a10a52 vs this head, two runs each):
French letters p95 3.09 -> 3.39/3.72 ms, p99 4.57 -> 4.84/5.30, 1.4 -> 6.1 lookups a
letter (worst 20); Portuguese letters p95 2.95 -> 3.65/3.86, 6.0 lookups (worst 20);
Polish (PoliMorf as the dictionary) letters p95 0.010 -> 0.019 ms. Spaces now carry the
whole-word search once a word: French p95 1.19 -> 1.72/1.89 ms, p99 2.1 -> 7.5/9.3 ms,
worst 250 lookups.