Wednesday, December 23, 2009

Re: Best practice and enhance performance duration of vimscript

> I have all book on gvim but no one tells me the best practice to have
> good performance when we write vimscript.

1. In regexps avoid when possible * wildcard.
2. When doing substitutions think if it is possible to check if
substitution is really necessary - in long run expression

if {is there something}
substitute()
endif

is often faster than empty run of substitute(). For this reason map()
can be real bottleneck.

3. :help profiling is your friend

m.

----------------------------------------------------
Tanie mieszkania!
Atrakcyjne lokalizacje nawet poniżej 5 000 zł za metr.
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fogl_do_5000zl.html&sid=938


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment