Skip to content

Instantly share code, notes, and snippets.

@babarot
Last active April 20, 2017 17:00
Show Gist options
  • Select an option

  • Save babarot/3eccb4f8dd9438c706fe7950ef2f669f to your computer and use it in GitHub Desktop.

Select an option

Save babarot/3eccb4f8dd9438c706fe7950ef2f669f to your computer and use it in GitHub Desktop.
vim-plug と dein.vim のベンチマーク結果
#!/bin/bash
mkdir -p /tmp/time
cd /tmp/time
# vim-plug ================================================
for i in {1..100}
do
vim \
-u ~/.vim-plug-vimrc -i NONE \
--startuptime=vim-plug-$$.log \
-c quit
done
echo "vim-plug"
for file in vim-plug-*.log
do
awk 'END {print $1}' "$file"
done \
| awk '
NR == 1{
max = $1
min = $1
}
{
sum += $1
if ($1 > max) max = $1
if ($1 < min) min = $1
}
END {
if (NR == 0) exit
print max
print min
print sum / NR
}'
# dein.vim ================================================
for i in {1..100}
do
vim \
-u ~/.dein-vim-vimrc -i NONE \
--startuptime=dein-vim-$$.log \
-c quit
done
echo "dein.vim"
for file in dein-vim-*.log
do
awk 'END {print $1}' "$file"
done \
| awk '
NR == 1{
max = $1
min = $1
}
{
sum += $1
if ($1 > max) max = $1
if ($1 < min) min = $1
}
END {
if (NR == 0) exit
print max
print min
print sum / NR
}'
@blueyed
Copy link

blueyed commented Oct 6, 2016

@b4b4r07
What are the results / was the outcome?

@mrap
Copy link

mrap commented Dec 6, 2016

+1 with @blueyed

@pickfire
Copy link

pickfire commented Mar 3, 2017

I see no results when testing with neovim.

nvim: Garbage after option argument: "--startuptime=vim-plug-14423.log"
More info with "nvim -h"
vim-plug
awk: vim-plug-*.log: No such file or directory
nvim: Garbage after option argument: "--startuptime=dein-vim-14423.log"
More info with "nvim -h"
dein.vim
awk: dein-vim-*.log: No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment