From: zedshaw@... Date: 2005-08-13T06:28:00+09:00 Subject: Re: Ruby Performance Wow, that C program is really fast, especially with the -O3 option. Too bad there wasn't a way to hook your spiffy ultra-fast C loop into Ruby. Wouldn't that be great? Some kind of "C" extension thing. Then, your Ruby (and any language that can 'hook' C) is basically as fast as C or even Assembler if you really get desperate. Too bad that didn't exist. Oh well, I guess you'll have to keep testing these loops and comparing them with Perl. Zed A. Shaw http://www.zedshaw.com/ > I started with 4294967296 and kept reducing it because I got bored of > waiting). > Code is provided below. > > Any way, on a 3Ghz P4 CPU, I got the following results: > > (Just out of interest I did it in C as well): > > (Average Run, non-optimised) > real 0m0.142s > user 0m0.136s > sys 0m0.005s > > (Average Run, -O3 optimisations): > real 0m0.074s > user 0m0.070s > sys 0m0.004s >