>>require'benchmark'
=> true>>includeBenchmark
=> Object>>bmbm(100) do |x|
?> x.report('Check every char is number') do?>!!"this is just a test".match(/\A[0-9]+\Z/)
>>end>> x.report('Check it does not contain word characters') do?>!"this is just a test".match(/[^0-9]/)
>>end>>endRehearsal---------------------------------------------------------------------------------------------------------------------------------------Check every char is number 0.0000000.0000000.000000 ( 0.000023)
Check it does not contain word characters 0.0000000.0000000.000000 ( 0.000011)
------------------------------------------------------------------------------------------------------------------------------ total: 0.000000sec
user system total real
Check every char is number 0.0000000.0000000.000000 ( 0.001136)
Check it does not contain word characters 0.0000000.0000000.000000 ( 0.000067)