Even faster:
alias _test { noop $1- }
alias benchread1 {
var %ticks = $ticks
filter -fk test.txt _test *}}}}}}}}}}*
echo -a * Test completed in: $calc($ticks - %ticks) ms with $filtered results.
}
that still requires mIRC to evaluate $_test($1-) for $1- = each line in turn :P
knowing that mIRC evaluates $<arg>($1-) where <arg> is the argument you've supplied, necessarily a single word, we can start throwing out suggestions as to what value of <arg> we can select that takes the least amount of work to evaluate.
for a while i would've suggested <arg> = () which causes mIRC to evaluate
$()($1-) for each matching line. $() produces $null of course, and the bit on the end is simply ignored to save mIRC the trouble of evaluating $1-.
however, after a bit testing, it seems <arg> = ~~ (producing
$~~($1-) as the piece of code to evaluate repeatedly) is slightly quicker. $~identifier(), as we know, avoids calling custom aliases and also suppresses the identifier warning if 'identifier' doesn't exist as an internal identifier. generally, $abc won't be evaluated if $~ident($abc) is used and 'ident' doesn't exist, so like before we avoid $1- having to be evaluated.
i dare say $~~() is unlikely to ever be introduced as an internal identifier, and for some reason mIRC seems to be able to recognize that $~~() doesn't exist slightly quicker than, for example, $~a() or $~b() etc.