benchmark.completion: adding a benchmark of tools.completion.

db4
John Benediktsson 2012-06-19 14:09:38 -07:00
parent 693dd717c4
commit 03cd8c288d
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
USING: kernel sequences tools.completion ;
IN: benchmark.completion
: completion-benchmark ( -- )
"nth" 25,000 [
{
nth ?nth nths set-nth insert-nth
remove-nth remove-nth! change-nth
}
] replicate concat [ name-completions ] keep
[ length ] bi@ assert= ;
MAIN: completion-benchmark