Created
January 16, 2012 20:32
-
-
Save nukino/1622825 to your computer and use it in GitHub Desktop.
[20120117-0532]test.vim/List代入チェック
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func! s:test_func1() | |
let i = 0 | |
while ( i < 500000 ) | |
let dummy = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30] | |
let i += 1 | |
endwhile | |
endfunc | |
func! s:test_func2() | |
let i = 0 | |
while ( i < 500000 ) | |
let dummy = [ | |
\1,2,3,4,5,6,7,8,9,10, | |
\11,12,13,14,15,16,17,18,19,20, | |
\21,22,23,24,25,26,27,28,29,30 | |
\] | |
let i += 1 | |
endwhile | |
endfunc | |
func! s:test_func3() | |
let i = 0 | |
while ( i < 500000 ) | |
let dummy = [ | |
\1,2, | |
\3,4, | |
\5,6, | |
\7,8, | |
\9,10, | |
\11,12, | |
\13,14, | |
\15,16, | |
\17,18, | |
\19,20, | |
\21,22, | |
\23,24, | |
\25,26, | |
\27,28, | |
\29,30 | |
\] | |
let i += 1 | |
endwhile | |
endfunc | |
func! s:test_func4() | |
let i = 0 | |
while ( i < 500000 ) | |
let dummy = [ | |
\1, | |
\2, | |
\3, | |
\4, | |
\5, | |
\6, | |
\7, | |
\8, | |
\9, | |
\10, | |
\11, | |
\12, | |
\13, | |
\14, | |
\15, | |
\16, | |
\17, | |
\18, | |
\19, | |
\20, | |
\21, | |
\22, | |
\23, | |
\24, | |
\25, | |
\26, | |
\27, | |
\28, | |
\29, | |
\30 | |
\] | |
let i += 1 | |
endwhile | |
endfunc | |
func! TestFunction() | |
let st_time = reltime() | |
call s:test_func1() | |
echo "s:test_func1->" . split(reltimestr(reltime(st_time)))[0] | |
let st_time = reltime() | |
call s:test_func2() | |
echo "s:test_func2->" . split(reltimestr(reltime(st_time)))[0] | |
let st_time = reltime() | |
call s:test_func3() | |
echo "s:test_func3->" . split(reltimestr(reltime(st_time)))[0] | |
let st_time = reltime() | |
call s:test_func4() | |
echo "s:test_func4->" . split(reltimestr(reltime(st_time)))[0] | |
endfunc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment