Re: ? 1={}, is there really any other interpretation?

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

c.k.lester wrote:
> Sequence ops aren't that slow anymore...? Were they in the past? Rob?

In 1.5a I speeded up most sequence ops on integers by about 30%,
by adding an end marker on each sequence. This eliminated
one test per element.

There is no simple rule of thumb that will tell you whether
a sequence op will be faster than a loop. Usually there is
not much difference, and you should write the code in
the simplest, easiest to understand way. Some factors
that come into play:

   * the cost per element is generally lower for sequence ops

   * the cost of allocating/deallocating space for sequences 
     adds overhead to sequence ops. Short sequences will be 
     affected more by this.

   * very long sequences may suffer from not being able to fit
     into the on-chip CPU data cache, so you end up reading them
     from slower RAM memory

   * doing multiple ops on an element while you have it in cache
     is better than doing one op and storing the result in a long
     temporary sequence that doesn't fit into cache. i.e. making many
     passes through long sequences in RAM. This factor favors atomic
     ops in loops.

   * use of the Translator will speed up loops of atomic ops,
     especially integer ops, but won't speed up sequence ops much at all

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu