Re: type string
At 03:07 AM 13-03-1999 , you wrote:
>Daniel, I ran string6() and your version of string() above thru the
>strbench.ex program you posted earlier, and string6() wins every time!
>
>It's because the "not sequence(s)" and "integer(c)" tests are crucial to the
>edge that string6() has. Every time I changed one or the other to what you
>suggested, the speed dropped. [Using "c<1" instead of "c<0" made no
>significant difference.]
>
>
>Running on a PII 200mHz in DOS under WinNT:
> -------------------------------------------
>ex strbench 100000 6
>
>string6z() - 0.001285 "c<0" replaced with "c<1"
>string6() - 0.001288
>string6s() - 0.001304 "not sequence(s)" replaced with "atom(s)"
>string6i() - 0.001324 "integer(c)" replaced with "atom(c)"
>string() - 0.001344
>
>
>The far-right digit varied a little, but the other digits remained the same
>every time.
>
>Now, I know that Euphoria allows fp values for its string chars, but is it
>*really* necessary for the string() type to allow them, too? It's the
>biggest speed-killer of the bunch (string6i above).
The point of my suggestion wasn't speed, but compatibility with Euphoria's
way to treat sequences. I believe that it must test for atoms in the range
of 1..255 to be a true Euphoria string type, otherwise it would be a subset
of Euphoria supported string values.
BTW I avoided some of the randomness of the benchmark under NT using
exw.exe instead of ex.exe (and the numbers returned are much more "real"
than those 0.00xxx seconds ex.exe gives).
Regards,
Daniel Berstein
[ daber at pair.com ]
|
Not Categorized, Please Help
|
|