Avatar for the jquast user
jquast
wcwidth
BlogDocsChangelog

Improve clip() and width() with hyperlinks and overtyping

#216Merged
Comparing
jq/refactor
(
495f1fa
) with
master
(
5b74bf0
)
CodSpeed Performance Gauge
+14%
Improvement
1
Untouched
63
New
22

Benchmarks

86 total
test_clip_japanese
tests/test_benchmarks.py
CodSpeed Performance Gauge
+14%
128.4 µs112.7 µs
test_clip_cursor_cr_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A609.1 µs
test_clip_dense_ansi_no_overtype
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A543.8 µs
test_clip_dense_ansi_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A546.5 µs
test_clip_cursor_cr_overwrite
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A2.8 ms
test_clip_complex_sgr_no_overtype
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A251.4 µs
test_clip_cursor_csi_backward
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A832.1 µs
test_clip_dense_ansi_no_propagate_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A2.1 ms
test_clip_dense_ansi_no_propagate
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A2.3 ms
test_clip_dense_ansi_no_propagate_no_overtype
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A2.1 ms
test_clip_dense_ansi_overtype
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A641.7 µs
test_ljust_ascii_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A25 µs
test_clip_long_ascii_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A153.2 µs
test_clip_long_ascii_fastpath
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A150.1 µs
test_clip_long_cjk_overtype
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A10.6 ms
test_clip_long_cjk_past_window
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A435.7 µs
test_clip_dense_ansi_past_window
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A775.2 µs
test_clip_long_cjk_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A436.4 µs
test_clip_with_ansi_no_overtype
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A160.2 µs
test_width_dense_ansi_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A303.5 µs
test_width_complex_ansi_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A47.1 µs
test_wrap_with_ansi_control_codes_ignore
tests/test_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A5.6 ms
test_iter_sequences_mixed
tests/test_benchmarks.py
CodSpeed Performance Gauge
+7%
54.7 µs51.2 µs
test_strip_sequences_simple
tests/test_benchmarks.py
CodSpeed Performance Gauge
+4%
26.3 µs25.3 µs

Commits

Click on a commit to change the comparison range
Base
master
5b74bf0
-42.17%
Merge remote-tracking branch 'origin/master' into jq/refactor
abc6772
13 days ago
by jquast
+0.16%
Add legacy import helper
e0da554
13 days ago
by jquast
0%
unused reference
d214ef8
13 days ago
by jquast
0%
nit
0e232a7
13 days ago
by jquast
+28.61%
make painter's algorithm optional by cursor sequence movement
36d654b
13 days ago
by jquast
-31.07%
docfix
4809924
11 days ago
by jquast
+23.86%
return to inline/duplicated wcswidth/width
1e8b3c8
11 days ago
by jquast
+32.8%
refactor, no _ClipContext
6490d47
11 days ago
by jquast
+1.3%
add many cc=ignore and two overtyping=True benchmarks
2b89964
11 days ago
by jquast
+0.52%
pylint
251a319
11 days ago
by jquast
-0.09%
now i'm 100% certain of no possible ill-effects of refactor
ea8fffc
11 days ago
by jquast
+0.26%
alright, fixadoodle
1e5f195
11 days ago
by jquast
-0.43%
skip pedantic tests without cospeed installed
a3155a9
11 days ago
by jquast
+0.25%
bugfix version
a2dbb94
11 days ago
by jquast
-0.09%
nit
495f1fa
11 days ago
by jquast
© 2026 CodSpeed Technology
Home Terms Privacy Docs