Race the UTF-8 decoder against coreutils
Every case in the suite pinned LC_ALL=C, so the multibyte path - the one whose counts go wrong quietly rather than crashing - had no contract behind it at all. genfile grew a --utf8 mode that writes mixed CJK, ASCII words, a tab, an ideographic space, a no-break space and a combining accent, and the words suite now races -w, -m and -L over 300k lines of it under en_US.UTF-8 (C.UTF-8 as a fallback), against coreutils. The case runs the locale on both sides rather than inheriting the C pin, because the oracle's own decoder is the reference. It prints SKIP rather than passing when the host has no UTF-8 locale: a multibyte count cannot be checked in a single-byte one.
This commit is contained in:
@@ -260,7 +260,9 @@ monsters: 100M lines raced against coreutils, and 1B lines timed solo
|
||||
— there is no reference for that one; we are the reference now. The
|
||||
lines suite also races `-L` at 1M and 10M lines, and ends with a
|
||||
128-file list (12.8M lines) so the worker pool is under the contract
|
||||
too, not just in some table in this file. When the run ends, the
|
||||
too, not just in some table in this file. The words suite finishes with
|
||||
`-w`, `-m` and `-L` over mixed UTF-8 text under a real UTF-8 locale,
|
||||
because the decoder's counts are the ones that go wrong quietly. When the run ends, the
|
||||
average speedup of fastwc against each oracle is printed.
|
||||
|
||||
## Development
|
||||
|
||||
Reference in New Issue
Block a user