Toot

Written by chesheer on 2024-12-15 at 17:23

I've made some experiments with vim and neovim on my HP Stream laptop with OpenBSD (Intel N3060 instead of CPU, 4Gb of RAM, some eMMC) to see how fast vim and neovim are.

laptop.local.domain:me $ time vim -c "q!"

0m00.39s real 0m00.24s user 0m00.12s system

laptop.local.domain:me $ time nvim -c "q!"

0m00.12s real 0m00.06s user 0m00.05s system

Not surprising, my neovim installation is clear, with no config, whereas vim has 151 lines in .vimrc with exactly two plugins (NERDTree and Notational-fzf). So it's bound to be heavier. Also, all numbers aren't cold starts, so some libraries are already loaded in memory.

Now, let's see how clear run fares:

laptop.local.domain:me $ time vim -u "NONE" -c "q!"

0m00.09s real 0m00.04s user 0m00.05s system

laptop.local.domain:me $ time nvim -u "NONE" -c "q!"

0m00.10s real 0m00.05s user 0m00.02s system

Pretty much on par with each other. Next, I've prepared redacted .vimrc excluding plugins and everything else to see which options influence load times the most.

Single "set number" option doesn't influence load time at all. But when I turn "filetype plugin on" I get some increase in load time:

laptop.local.domain:me $ time vim -u ".vimrc2" -c "q!"

0m00.16s real 0m00.10s user 0m00.05s system

Around 6ms. I've tried including many other options and most of them won't influence load time at all (remaps, autogroups, functions, global variables, etc.), except "set nocompatible" that adds 2ms more.

Adding any plugin heavily influences load time. Say, vim-airline alone can do this:

laptop.local.domain:me $ time vim -u ".vimrc2" -c "q!"

0m00.76s real 0m00.68s user 0m00.06s system

But neovim with vim-airline does it much better (on the same config file).

laptop.local.domain:me $ time vim -u ".vimrc2" -c "q!"

0m00.70s real 0m00.60s user 0m00.07s system

laptop.local.domain:me $ time nvim -u ".vimrc2" -c "q!"

0m00.47s real 0m00.33s user 0m00.11s system

Here's what neovim capable of with only NERDTree and notational-fzf installed:

laptop.local.domain:me $ time nvim -u ".vimrc2" -c "q!"

0m00.23s real 0m00.10s user 0m00.11s system

Looks waaay better to me than vim. Of course, on a somewhat more capable hardware you probably won't notice the difference, but in my case it's night and day. That's a little sad as I've always prefered vim to neovim.

=> More informations about this toot | View the thread | More toots from chesheer@bsd.cafe

Mentions

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113657999221187315
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
237.687838 milliseconds
Gemini-to-HTML Time
1.60291 milliseconds

This content has been proxied by September (3851b).