MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

more efficiency questions



So one of the most commonly-called verbs on LambdaCore is :gag_p, which
contains (or, at one point, contained) a loop like this:

  for x in (callers())
    for y in (this.gaglist)
      if (y in x)
        return 1;
      endif;
    endfor;
  endfor;

and I was looking at ways to modify that.  The thing which came to mind
was to try something like:

  c = toliteral(callers());
  for y in (this.gaglist)
    if (index(c, y + ",") || index(c, y + "}"))
      return 1;
    endif;
  endfor;

and then the idea came to mind of making a regexp on the fly to do this.
So while I can count the ticks I wonder how this would hit the CPU.  How
do these things stack up?

Seth / Blackbriar
----------------------------------------------------------------------
Seth I. Rich - sir@po.cwru.edu
                                 There is nothing more precious than
Rabbits on walls, no problem.    a tear of true repentance.



Home | Subject Index | Thread Index