neovim/test/benchmark
VanaIgr cca8a78ea2
perf: improve utf_char2cells() performance (#27353)
`utf_char2cells()` calls `utf_printable()` twice (sometimes indirectly,
through `vim_isprintc()`) for characters >= 128. The function can be
refactored to call to it only once.

`utf_printable()` uses binary search on ranges of unprintable characters
to determine if a given character is printable. Since there are only 9
ranges, and the first range contains only one character, binary search
can be replaced with SSE2 SIMD comparisons that check 8 ranges at a
time, and the first range is checked separately. SSE2 is enabled by
default in GCC, Clang and MSVC for x86-64.

Add 3-byte utf-8 to screenpos_spec benchmarks.
2024-02-07 15:03:45 +08:00
..
autocmd_spec.lua build: enable lintlua for test/unit/ dir #26396 2023-12-04 14:32:39 -08:00
bench_regexp_spec.lua build: enable lintlua for test/unit/ dir #26396 2023-12-04 14:32:39 -08:00
deepcopy_spec.lua feat(lua): add noref to deepcopy 2024-01-03 19:17:52 +00:00
iter_spec.lua feat(lua): rename vim.loop -> vim.uv (#22846) 2023-06-03 12:06:00 +02:00
preload.lua vim-patch:7.4.497 #2295 2015-04-05 19:24:58 -04:00
screenpos_spec.lua perf: improve utf_char2cells() performance (#27353) 2024-02-07 15:03:45 +08:00
treesitter_spec.lua build: enable lintlua for test/unit/ dir #26396 2023-12-04 14:32:39 -08:00