I can't confirm any reduced performance in $regex. I didn't test your script because it is by no means an accurate reflection of $regex's performance. It contains too much irrelevant stuff, like $gettok, /if and $iif, which is notoriously slow. I used this:
alias regextest {
var %i = $1, %r = ^-([a-zA-Z]+[0-9]*|[0-9]+), $&
%s = This is a test _ of mIRC RegEx, %t = $ticks
while %i { !.echo -q $regex(%s,%r) | dec %i }
echo -s $calc($ticks - %t)
}
Running
/regextest 150000 on 6.16 and 6.17 did show some very small difference (6.17 being slower) but I wasn't convinced that it was the $regex call that made the difference, so I tested with another alias, that measures $regex's actual processing time, as accurately as possible. It does this by running a loop with $regex, then running the exact same loop but without $regex and finally subtracting the duration of the second from the duration of first:
alias regextest2 {
var %i = $1, %j = %i, %r = ^-([a-zA-Z]+[0-9]*|[0-9]+), $&
%s = This is a test _ of mIRC RegEx, %u, %t = $ticks
while %i { !.echo -q $regex(%s,%r) | dec %i }
%u = $ticks
while %j { !.echo -q %s %r | dec %j }
echo -s $calc(%u * 2 - $ticks - %t)
}
Running
/regextest2 100000 a bunch of times on both versions gave these results:
6.161046
1079
968
1078
1047
6.171016
1047
1124
1125
1046
So my suspicion was confirmed: what got a tiny bit slower is the looping mechanism (variable retrieval seems to perform the same, as I tested all the above by passing the literal strings in $regex too). $regex performance seems to be exactly the same as in 6.16.
These results show something that one needs to keep in mind when comparing the perfomance of things between the two versions: since looping itself has become slower, one has to make up for this in the related benchmarks.
Btw, I tested other regex patterns too, in case that made a difference, but I got the same results