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