1
0
Fork 0
mirror of synced 2024-11-04 16:38:59 -05:00
ultimate-vim/sources_non_forked/vim-gitgutter/unplace.vim
Amir Salihefendic 02572caa95 Updated plugins
2018-03-31 11:56:26 -03:00

27 lines
588 B
VimL

" Measure how long it takes to unplace signs.
"
" Source this file with `:source %` or `vim -S unplace.vim`
let num = 500
sign define Foo text=*
new
call append(0, range(1, num))
for i in range(1, num)
execute "sign place ".i." line=".i." name=Foo buffer=".bufnr('')
endfor
let start = reltime()
for i in range(1, num)
execute "sign unplace ".i
endfor
let elapsed = reltime(start)
bdelete!
echom split(reltimestr(elapsed))[0]."s to remove ".num." signs"
echom string(reltimefloat(elapsed) * 1000 / num).' ms/sign'
echom string(float2nr(num / reltimefloat(elapsed))).' sign/s'