This is an experimental fork ofVim. It explores ways of making Vim script faster and better.
WARNING: Do not use for daily work, it’s likely to crash!
1. FASTER VIM SCRIPT
The third item on the poll results of (****************************************************************, after popup windows and text properties, is faster Vim script. So how do we do that?
I have been throwing some ideas around, and soon came to the conclusion that the current way functions are called and executed, with dictionaries for the arguments and local variables, is never going to be very fast. We’re lucky if we can make it twice as fast. The overhead of a function call and executing every line is just too high.
So what then? We can only make something fast by having a new way of defining a function, with similar but different properties of the old way:
Arguments are only available by name, not through the a: dictionary or the a: list.Local variables are not available in an l: dictionary.
A few more things that slow us down, such as exception handling details.
I Implemented a “proof of concept” and measured the time to run a simple for loop with an addition (Justin used this example in his presentation, full code is below):
- 1) ,