Skip to content

Instantly share code, notes, and snippets.

@japhb
Created October 31, 2011 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save japhb/1327012 to your computer and use it in GitHub Desktop.
Save japhb/1327012 to your computer and use it in GitHub Desktop.
Baseline test of Str.Numeric() in nom
# Nowhere to go but up ... :-)
# Δt is the time actually spent in the tight .Numeric loop;
# most of the remainder is spent generating the test strings.
# The first three rows of output indicate successful parses;
# the Failure() row indicates cases that don't parse correctly.
$ time ./perl6 ./test-numeric
"Int()" => 7438
"Num()" => 70389
"Rat()" => 1839
"Failure()" => 196388
"TOTAL" => 276054
Δt = 214.54207110405
real 9m5.603s
user 9m3.126s
sys 0m1.460s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment