benchmark.lexer: adding a lexer benchmark.

db4
John Benediktsson 2014-05-20 19:15:12 -07:00
parent bec6c99e29
commit 3be0958e5d
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
! Copyright (C) 2014 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: io.encodings.ascii io.files kernel lexer math ;
IN: benchmark.lexer
: lexer-benchmark ( -- )
10,000 "vocab:math/math.factor" ascii file-lines [
<lexer> [ parse-token ] curry loop
] curry times ;
MAIN: lexer-benchmark