Skip to content

Instantly share code, notes, and snippets.

@Shougo
Created April 18, 2016 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shougo/d54fb927937e1f763d52732c17134838 to your computer and use it in GitHub Desktop.
Save Shougo/d54fb927937e1f763d52732c17134838 to your computer and use it in GitHub Desktop.
let s:plugins = range(1, 10000)
let temp = tempname()
call writefile([string(s:plugins)], temp)
let file = readfile(temp)[0]
let start = reltime()
for i in range(1, 100)
sandbox let plugins1 = eval(file)
endfor
echomsg reltimestr(reltime(start))
call writefile([json_encode(s:plugins)], temp)
let file = readfile(temp)[0]
let start = reltime()
for i in range(1, 100)
let plugins2 = json_decode(file)
endfor
echomsg reltimestr(reltime(start))
if !has('nvim')
call writefile([js_encode(s:plugins)], temp)
let file = readfile(temp)[0]
let start = reltime()
for i in range(1, 100)
let plugins3 = js_decode(file)
endfor
echomsg reltimestr(reltime(start))
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment