in

brammool / vim9, Hacker News

brammool / vim9, Hacker News


    

Vim Logo

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!

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):

********************** (let) sum

=

(0)   for

i

in range**************** (

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Murder investigation after stabbing in Finsbury Park, London – BBC News, BBC News

Murder investigation after stabbing in Finsbury Park, London – BBC News, BBC News

[FREE]Basic Python Programming for Beginners for Data Analysis