Of course your first example is completely invalid because it has nothing to do with /filter. My claim was /filter -ww was as fast as (or only slightly faster than) /filter -ff/-wf/-fw, not that many $read's would be as fast as many memory accesses. That is a completely different function with completely different behaviour. The good thing about your example is that I can still do it with /filter using the -k switch to /write in a callback to some aux file and then merge it back after. I'll leave it as an excercise to you, but I guarantee it's not substantially slower than an $fline loop.

The other good thing about your example though, is that even without /filter, there is still a faster way to do it.. it's called hash tables, which is mIRC's "storage method similar to custom windows" that you so incorrectly claim it lacks. Quickly converting the script to a hash table script,

Code:
alias yay { echo -ag Hash: $yayF @window: $yay@ }
alias yayF {
  var %i = 1 | while (%i < 1001) { hadd -m yay %i a r g %i v 0 | inc %i }
  var %t = $ticks, %i = 1
  while (%i < 1001) {
    var %rec = $hget(yay, $hfind(yay,& & & 500 & &,1,w).data)
    hadd yay 500 $puttok(%rec,500,4,32)
    inc %i
  }
  hfree yay
  return $calc($ticks - %t)
}
alias yay@ {
  var %i = 1 | window -h @yay | while (%i < 1001) { aline @yay a r g %i v 0 | inc %i }
  var %t = $ticks, %i = 1
  while (%i < 1001) {
    var %rec = $fline(@yay,& & & 500 & &,1).text
    rline @yay 500 $puttok(%rec,500,4,32)
    inc %i
  }
  window -c @yay
  return $calc($ticks - %t)
}


you find that:
Hash: 94 @window: 328

So much for faster, again.

Conclusion? Use the right tool for the right job. It really is that simple.

edit: PS. I won't even bother deciphering your second example, but your initial statement is also wrong there. /filter can deal with strings like "*!*@*blah".. use the -g switch to make the matchtext a regular expression and then write it as: "\*!\*@\*blah". From what I understand, it makes your entire second alias completely obsolete.

Last edited by argv0; 02/08/08 05:55 AM.

- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"