William James wrote:
[snip]
> 
> Rehearsal ------------------------------------------
> regexp   6.870000   0.000000   6.870000 (  7.391000)
> array    2.653000   0.000000   2.653000 (  2.874000)
> --------------------------------- total: 9.523000sec
> 
>              user     system      total        real
> regexp   6.940000   0.000000   6.940000 (  7.441000)
> array    2.634000   0.000000   2.634000 (  2.854000)
> 
> 10000
> 10000


The regex engine makes a difference in this case -- ruby1.8.5 + the
oniguruma engine gives:


  Rehearsal ------------------------------------------
  regexp   2.740000   0.010000   2.750000 (  2.960385)
  array    3.120000   0.000000   3.120000 (  3.120808)
  --------------------------------- total: 5.870000sec

               user     system      total        real
  regexp   2.750000   0.000000   2.750000 (  2.743031)
  array    3.140000   0.000000   3.140000 (  3.137098)

  10000
  10000


cheers,
andrew

-- 
Posted via http://www.ruby-forum.com/.