diff --git a/extra/benchmark/lexer/lexer.factor b/extra/benchmark/lexer/lexer.factor new file mode 100644 index 0000000000..d3ba6fa7b7 --- /dev/null +++ b/extra/benchmark/lexer/lexer.factor @@ -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 [ + [ parse-token ] curry loop + ] curry times ; + +MAIN: lexer-benchmark