Re: Optimization Question for Robert

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

Robert, this sounds like an extremely usefull optimization.
Up until now you've only optimized special cases like this:

s = append(s, x )
s = s & x

And trust me, you'll be suprised what the gain will be with long sequences.

function double (sequence s)
    s = s & s
    return s
end function

s = double (s)

-- Should be as fast as:

s = s & s

-- Why ?

It will motivate people to structure their code more nicely, since there
will be no speed loss.

If you take a look at some of my programs that require speed, you can see I
inline a lot. And lately, I do a lot of the reference-handle tricks as well.

This will prolly also solve the saving speed of EDOM with extreme large
values (as reported by Terence) wich slowsdown with a factor of 2 as the
length of the data increases. Sounds like copy-ing and re-assigning an
reference every so many times.

And what about compression ?
All routines handling huge amounts of data, will be enourmously sped up by
this and you no longer feel guilthy using routines, and other more clean
ways of programming at the cost of speed.

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl
UIN: 9389920

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

Search



Quick Links

User menu

Not signed in.

Misc Menu