[REBOL] creation of a block with a lot of integers Re:(4)
From: peoyli:algonet:se at: 7-Oct-2000 15:05
This is a MIME encoded multipart message. The fact that you are reading
this means you don't have a MIME capable mail program. You might still
be able to read part of the mail's content, but some of it may require
a MIME capable mail reader to decode. Following are some URLs where
you can find MIME-capable mail programs for common platforms:
Amiga............: MicroDot-II http://www.vapor.com/
Unix.............: Metamail ftp://ftp.bellcore.com/nsb/
Windows/Macintosh: Eudora http://www.qualcomm.com/
General info about MIME can be found at:
http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/mime-faq/top.html
--=_=8<==MD239DFB81A-66DA01C5==8<=_Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
> Thanks for the numbers!
>
Here's some more tests..
I did the same test using perl, and its native .. range operator:
50000 100000 200000 400000
20001-70000 20001-120000 20001-220000 20001-420000
REBOL 5s 10s 20s 41s
Perl 1s 3s 8s 15s
100001 100001
-50000 - 50000 -150000 - 50000
REBOL 10s 10s
Perl 5s 4s
I can run a test in assembly language too, but I think it will be too
fast to be timed even with 400000 values...
Maybe REBOL could need a native range operator anyway (I've seen that
discussion some time ago) ?
/PeO
> [peoyli--algonet--se] wrote:
> >
> > > Hi, peoyli,
> > >
> > ...
> > >
> > > It would be interesting to have you try a couple of the above options
> > > along with your original for version and post the timings, if you
> > > have the spare time.
> > >
> > > -jn-
> >
> > Ok,,
> >
> > here comes my test results, along with the code being tested..
> >
--=_=8<==MD239DFB81A-66DA01C5==8<=_Content-Type: text/plain; charset=us-ascii; name="jox.pl"
Content-Transfer-Encoding: plain (7/8 bit)
Content-Disposition: attachment; filename="jox.pl"
X-MD2-FilePath: Ram Disk:jox.pl
#!/usr/local/bin/perl
intblock(20001, 25000);
intblock(20001, 70000);
intblock(20001, 120000);
intblock(20001, 220000);
intblock(20001, 420000);
intblock(-50000, 50000);
intblock(-150000, -50000);
sub intblock
{
my($min,$max) = @_;
local($len_a,$tim1);
$tim1 = time();
@a = ($min..$max);
print "\nElapsed time: ", time() - $tim1, " seconds\n";
$len_a = @a;
print "Size of array: $len_a\n";
print "Array's first value: $a[0]\n";
print "Array's last value: $a[$len_a - 1]\n";
}
--=_=8<==MD239DFB81A-66DA01C5==8<=_=--
(end of MIME multipart message)