[MacRuby-devel] Regular expression related performance
Jordan K. Hubbard
jkh at apple.com
Wed Dec 1 16:45:39 PST 2010
On Dec 1, 2010, at 3:50 PM, Laurent Sansonetti wrote:
> Before:
>
> $ time /usr/local/bin/macruby -e "text=File.read('/tmp/foo.txt'); freq=Hash.new(0); text.scan(/\w+/) {}"
>
> real 0m2.430s
> user 0m1.628s
> sys 0m1.030s
>
> After :)
>
> $ time ./miniruby -e "text=File.read('/tmp/foo.txt'); freq=Hash.new(0); text.scan(/\w+/) {}"
>
> real 0m0.121s
> user 0m0.100s
> sys 0m0.015s
Two orders of magnitude faster! *Nice*!
- Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101201/01c01a15/attachment.html>
More information about the MacRuby-devel
mailing list