[REBOL] Re: Have a look at the loops...!
From: anton::lexicon::net at: 12-Apr-2002 0:52
> dosort1: func [ n [integer!] ] [
>
> dots: array/initial n "."
> ]
>
> * Time sort1: 0:00:01.417908
> dosort2: func [ n [integer!] ] [
>
> dots: array/initial n (to-char random(256))
> ]
>
> * Time sort2: 0:00:00.978082
> (Why is this quicker then sort1 ????, dont be fooled by random!!!)
It's not random that's the issue.
In dosort1, you are adding n series to the array = a series of series.
In dosort2, you are adding n char!s to the array = a series of char!s.
char!s are a simpler datatype than a series, so it
makes sense to me that it's faster.
Anton.