Re: sleepless night & UFOs

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jiri,

I don't see how a complex function like Gabriel's can possibly be faster
than a straight-forward approach such as:

function remap(sequence s, sequence index, object newvalue)
    if length(index) > 1 then
        s[index[1]] =3D remap(s[index[1]], index[2..length(index)], newva=
lue)
    else
        s[index[1]] =3D newvalue
    end if
    return s
end function  -- remap

Are you sure you are timing it right?  Sometimes the first function in a
comparison takes longer - due to Causway memory allocation time?  I don't=

know the reason.

Vaya con dinero, Colin

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu