diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-28 11:15:19 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-29 08:23:02 -0400 |
| commit | 8b60368c1b9e23f0695557da170d416d71f7e6a3 (patch) | |
| tree | 567daec11deb4e34e33860de8bba787a9819bfff /src/nvim/testdir/test_regexp_latin.vim | |
| parent | aa6adacd77e59b2cf2ca7bdeae9a24c062b2a9c0 (diff) | |
| download | rneovim-8b60368c1b9e23f0695557da170d416d71f7e6a3.tar.gz rneovim-8b60368c1b9e23f0695557da170d416d71f7e6a3.tar.bz2 rneovim-8b60368c1b9e23f0695557da170d416d71f7e6a3.zip | |
vim-patch:8.1.0958: compiling weird regexp pattern is very slow
Problem: Compiling weird regexp pattern is very slow.
Solution: When reallocating post list increase size by 50%. (Kuang-che Wu,
closes vim/vim#4012) Make assert_inrange() accept float values.
https://github.com/vim/vim/commit/38f08e76acf7d21bb34cf8f79f0f82eb63cdc987
Omit changes to typval_compare()
because patch v8.0.1505 was not ported.
Diffstat (limited to 'src/nvim/testdir/test_regexp_latin.vim')
| -rw-r--r-- | src/nvim/testdir/test_regexp_latin.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_regexp_latin.vim b/src/nvim/testdir/test_regexp_latin.vim index 1bb2ee53de..a1da5db778 100644 --- a/src/nvim/testdir/test_regexp_latin.vim +++ b/src/nvim/testdir/test_regexp_latin.vim @@ -39,6 +39,17 @@ func Test_range_with_newline() bwipe! endfunc +func Test_pattern_compile_speed() + if !exists('+spellcapcheck') || !has('reltime') + return + endif + let start = reltime() + " this used to be very slow, not it should be about a second + set spc=\\v(((((Nxxxxxxx&&xxxx){179})+)+)+){179} + call assert_inrange(0.01, 10.0, reltimefloat(reltime(start))) + set spc= +endfunc + func Test_get_equi_class() new " Incomplete equivalence class caused invalid memory access |