Repository navigation
Unicode 18.0.0 support, releases soonish - #238
Conversation
Merging this PR will degrade performance by 31.4%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_iter_graphemes_combining |
76.6 µs | 286.6 µs | -73.27% |
| ❌ | test_iter_graphemes_emoji |
42.5 µs | 112.3 µs | -62.12% |
| ❌ | test_iter_graphemes_ascii |
46.4 µs | 107.4 µs | -56.83% |
| ❌ | test_clip_cursor_cr_control_codes_ignore |
341.9 µs | 604.3 µs | -43.42% |
| ❌ | test_clip_cursor_cr_overwrite |
1.8 ms | 2.8 ms | -37.67% |
| ❌ | test_clip_cursor_cr_to_end |
1.8 ms | 2.8 ms | -36.87% |
| ❌ | test_clip_long_cjk_overtype |
7.5 ms | 11.6 ms | -35.33% |
| ❌ | test_clip_long_cjk_to_end |
7.7 ms | 11.8 ms | -34.9% |
| ❌ | test_clip_dense_ansi_to_end_no_propagate |
6.8 ms | 10.1 ms | -32.69% |
| ❌ | test_clip_long_cjk_past_window |
326.1 µs | 477.2 µs | -31.68% |
| ❌ | test_clip_cursor_csi_backward |
573.1 µs | 834.1 µs | -31.29% |
| ❌ | test_clip_long_cjk_control_codes_ignore |
330.3 µs | 479.6 µs | -31.13% |
| ❌ | test_clip_complex_sgr_no_overtype |
180.3 µs | 244.8 µs | -26.35% |
| ❌ | test_clip_dense_ansi_to_end |
9.2 ms | 12.4 ms | -26.35% |
| ❌ | test_clip_complex_sgr |
186.9 µs | 252.1 µs | -25.84% |
| ❌ | test_clip_japanese_to_end |
102.5 µs | 135.9 µs | -24.59% |
| ❌ | test_clip_dense_ansi_control_codes_ignore |
420.6 µs | 537.5 µs | -21.76% |
| ❌ | test_clip_dense_ansi_no_overtype |
421 µs | 536.9 µs | -21.58% |
| ❌ | test_clip_japanese |
97.7 µs | 124.1 µs | -21.27% |
| ❌ | test_clip_dense_ansi_overtype |
546.7 µs | 662.4 µs | -17.47% |
| ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing jq/unicode-18 (70aa0cd) with master (85cc473)
|
The remaining test failure is because the 3.14 step also runs "tox -e fetch" but without the new Unicode 18 releases today, so this could be merged and released as soon as end of day. |
|
I have reverted to the python-only version of |
323a14b to
712191d
Compare
Implements C Python wrapper of our C11 iter_graphemes(), previous to #238 we used std python's iter_graphemes, but, as i wrote: > I can't say for sure if or when standard python's > unicodedata.iter_graphemes will be fixed for the > InCB/Indic_Conjunct_Break rules changed in unicode 18, so this is > expected to degrade performance for any grapheme-related functions. And so it seems we should implement a C Python shim to our own iter_graphemes(), so that we support Unicode 18 on all python versions equally by our own up-to-date impl.
Implements C Python wrapper of our C11 iter_graphemes(), previous to #238 we used std python's iter_graphemes, but, as i wrote: > I can't say for sure if or when standard python's > unicodedata.iter_graphemes will be fixed for the > InCB/Indic_Conjunct_Break rules changed in unicode 18, so this is > expected to degrade performance for any grapheme-related functions. And so it seems we should implement a C Python shim to our own iter_graphemes(), so that we support Unicode 18 on all python versions equally by our own up-to-date impl.
712191d to
36f165b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #238 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 2004 1980 -24
Branches 469 462 -7
=========================================
- Hits 2004 1980 -24 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
36f165b to
edac376
Compare
Implements C Python wrapper of our C11 iter_graphemes(), previous to #238 we used std python's iter_graphemes, but, as i wrote: > I can't say for sure if or when standard python's > unicodedata.iter_graphemes will be fixed for the > InCB/Indic_Conjunct_Break rules changed in unicode 18, so this is > expected to degrade performance for any grapheme-related functions. And so it seems we should implement a C Python shim to our own iter_graphemes(), so that we support Unicode 18 on all python versions equally by our own up-to-date impl.
|
The performance loss of |
Regenerate all tables for Unicode 18.0.0, and refresh the ucs-detect terminal override tables from the latest results. UAX #29 revision 48 relaxes GB9c: the leading \p{InCB=Consonant} requirement was dropped, so a linker no longer needs a consonant before it to join the following consonant. Revert to our own iter_graphemes() rather than python3.15's stdlib, which differs in subtle negative ways; the performance is planned to return by way of the libwcwidth C11 library. Two generator fixes come along. Measurements carrying 'delta_ypos' or an out-of-range width are now discarded instead of becoming override widths -- iterm2 reports -88 for five Burmese clusters. And the shared grapheme override tables are named by a codepoint digest rather than by hashing repr() of the cluster, which escapes characters the *running* interpreter's unicodedata considers unassigned and so made the generated _known_* filenames depend on which Python ran the generator. All _known_* files are renamed once. Unicode 18.0 is still pre-release, so bin/update-tables.py grows a --draft argument to fetch the draft data files. CI does not pass it; instead, a GraphemeBreakTest.txt fixture older than our tables now skips those tests rather than failing them.
edac376 to
2e6190b
Compare
Implements C Python wrapper of our C11 iter_graphemes(), previous to #238 we used std python's iter_graphemes, but, as i wrote: > I can't say for sure if or when standard python's > unicodedata.iter_graphemes will be fixed for the > InCB/Indic_Conjunct_Break rules changed in unicode 18, so this is > expected to degrade performance for any grapheme-related functions. And so it seems we should implement a C Python shim to our own iter_graphemes(), so that we support Unicode 18 on all python versions equally by our own up-to-date impl.
| _skipif_skew = pytest.mark.skipif( | ||
| _SKEW_OLDER, | ||
| reason="GraphemeBreakTest.txt is Unicode {} but tables are {}; unicode.org has not " | ||
| "published the final fixture yet".format(*(_SKEW or ('', '')))) |
There was a problem hiding this comment.
todo: we should be able to delete this
|
Unicode 18.0 released today, no changes in data files were found from the draft release. |
We expect Unicode 18.0 to release today.
UAX #20rules on grapheme clustering InCB/Indic_Conjunct_Breakiter_graphemes(), reduces performance! fixed in next release Use Python extension with libwcwidth #248wcstwidth()correction table updated with latest ucs-detect results (contour and rio are better-conforming)