Re: ABS fastest thus far
See..
>--mine, nonrecursive, only sign changes what is needed
>function abs4(object x)
> if atom(x) then
> if x<0 then return -x else return x end if
> end if
> for index=1 to length(x) do
> temp = x[index] --this assignment helped vs element lookup
> if temp<0 then x[index]=-temp end if
*CRASH* ... temp is an sequence. (when x has more than one dimension)
> end for
> return x
>end function
And howcome testing for atoms is quicker ?
Is atom () faster than sequence () .. Robert this should never be off
course..
Ralf
|
Not Categorized, Please Help
|
|