Marc Weber wrote: >> Joining lines by backslash in Vim scripts are bits slow. >> Currently, it call alloc/strcpy/strcat/free in each lines. > > If you are at it - would you mind spending some additional minutes on > the join() command? > Maybe it can be fixed equally fast. > Its very slow as well - that slow that we use workarounds in VAM: > https://github.com/MarcWeber/vim-addon-manager-known-repositories/blob/master/autoload/vamkr.vim > line 13 is much faster than line 14. > > line 5 shows one way to benchmark it. > > Marc Weber
Hi Marc Is that still really true? I remember that speed speed of joining lines was slow [ O(n^2) ] (where n is the number of lines to join) and it was fixed in Vim-7.3 in this checkin: === changeset: 2292:2209060c340d branch: vim73 user: Bram Moolenaar <[email protected]> date: Sat Jul 10 17:51:46 2010 +0200 files: runtime/doc/todo.txt src/edit.c src/ex_docmd.c src/normal.c src/ops.c src/proto/ops.pro description: Make joining a range of lines much faster. (Milan Vancura) === Regards -- Dominique -- You received this message from the "vim_dev" 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
