1 ! Copyright (C) 2012 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel math math.parser regexp sequences strings ;
6 : regexp-benchmark ( -- )
8 20,000 <iota> [ number>string ] map
9 200 <iota> [ 1 + CHAR: a <string> ] map
11 _ R/ \d+/ [ matches? ] curry all? t assert=
12 _ R/ [a]+/ [ matches? ] curry all? t assert=
15 MAIN: regexp-benchmark