Constant icu_normalizer::UTF16_FAST_PATH_FLUSH_THRESHOLD
source · pub(crate) const UTF16_FAST_PATH_FLUSH_THRESHOLD: usize = 4096;
Expand description
Number of iterations allowed on the fast path before flushing. Since a typical UTF-16 iteration advances over a 2-byte BMP character, this means two memory pages. Intel Core i7-4770 had the best results between 2 and 4 pages when testing powers of two. Apple M1 didn’t seem to care about 1, 2, 4, or 8 pages.
Curiously, the str
case does not appear to benefit from
similar flushing, though the tested monomorphization never
passes an error through from Write
.