Why on earth would you use a loop in the $perl_modulus alias? This would be considered inefficient even for a C program; it's unacceptably slow for mirc. Considering that the $perl_decode alias already does quite a lot of work, an optimized $perl_modulus is more than necessary.
Code:
alias perl_modulus {
  if $1 < 0 { return $calc($int($calc($1 / $2 - 1)) * - $2 + $1) }
  return $calc($1 % $2)
}
I also got rid of the variable %m and $abs(), which made things even worse.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com