[REBOL] Re: Fast way to remove all non-numerical chars from a string
From: Tom:Conlin:gmai:l at: 22-Sep-2007 15:32
that is what I was seeing as well
Prkr's can be speeded up with bitsets ...
filter: charset "0123456789"
start: now/time/precise
loop 1'000'000 [remove-each char "(250) 764-0929" [not find filter char]]
now/time/precise - start
parse with integers! was faster than remove-each but slower than trim
the trouble of including parse is you have to so something with the
results and that is not being done in these speed tests so it is not
really a fair comparison
rule: [copy num integer!(something num) | skip]
start: now/time/precise
loop 1'000'000 [parse/all "(250) 764-0929"[some rule]]
now/time/precise - start
a better picture of what the data is really like, where is coming from
going to ... would help
Carl Read wrote: