Keith Edmunds <kae@midnighthax.com> wrote:
> Optimising vim for a use case that will never exist in real life seems,
well, pointless.
> Why is this important to you?
I would not say that it's a useless use case.
It may be a rare case but it can happen. When it happens,
insertion can take so much time that user may have to
press CTRL-C.
I recall that this was discussed earlier but I can't find the thread.
It's probably not simple to fix so it has not been fixed yet.
Performance looks currently quadratic since time is multiplied
by ~ 4 each time we double the insert count:
$ /usr/bin/time ./vim --clean -c 'norm 5000ix' -c 'q!'
0.13user 0.00system 0:00.13elapsed 99%CPU (0avgtext+0avgdata
17532maxresident)k
0inputs+8outputs (0major+1292minor)pagefaults 0swaps
$ /usr/bin/time ./vim --clean -c 'norm 10000ix' -c 'q!'
0.72user 0.00system 0:00.73elapsed 99%CPU (0avgtext+0avgdata
17684maxresident)k
0inputs+8outputs (0major+1301minor)pagefaults 0swaps
$ /usr/bin/time ./vim --clean -c 'norm 20000ix' -c 'q!'
3.37user 0.00system 0:03.37elapsed 99%CPU (0avgtext+0avgdata
17744maxresident)k
0inputs+8outputs (0major+1311minor)pagefaults 0swaps
$ /usr/bin/time ./vim --clean -c 'norm 40000ix' -c 'q!'
14.05user 0.00system 0:14.06elapsed 99%CPU (0avgtext+0avgdata
17592maxresident)k
0inputs+8outputs (0major+1318minor)pagefaults 0swaps
In theory, it could be done quickly in O(n).
Regards
Dominique
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, May 15, 2018
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment