1. Re: type string
Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> wrote:
>global constant
>TRUE = 1,
>FALSE = 0
>
>global type string (object x)
>sequence s
>
> if sequence (x) then
> s = x
> for index = 1 to length(s) do
> x = s[index]
> if sequence (x) or compare (and_bits (x, 255),x) then
> return FALSE
> end if
> end for
> return TRUE
> else
> return FALSE
> end if
>
>end type
Ralf,
Here are the results from Daniel Berstein's benchmark program (test sequence
length = 36)...
]Performing 400000 iterations 5 times.
]Test string: 1234567890abcdefghijklmnopqrstuvwxyz
]
] Average time per type for 400000 iterations:
]
] string8 -- 3.714000 seconds
] string12 -- 3.752000 seconds
] string13 -- 4.454000 seconds [Chris Hickman's]
] string14 -- 5.162000 seconds [yours]
..and from Chris Hickman's benchmark program (average test sequence length
= 386)...
]String8: 4.17
]String12: 4.17
]String13: 2.89 [Chris']
]String14: 5.95 [yours]
>Arguments that apply:
You have some good arguments, but what counts in the end is how fast it
actually runs. The arguments can only point you in a good direction; you
still have to actually *run* the thing to find out if your arguments are
correct.
Be seeing you,
Gabriel Boehme
-------
BIRTHDAY GREETINGS
Many happy returns to Patrick McGoohan -- the Prisoner is 71 today!
(Whoops, I forgot -- he's *not* a number, he's a *free* *man*...)
-------