(Since it's an alias definition you can remove the /'s)

The script you made does not (only) test how long it takes to count to 100, it also counts the time for 2000 /set and 1000 /inc commands, and most importantly 1000 screen updates (/echo). You have to realize that updating the screen takes a long time in comparison to those /set's, so this is really the most important factor. If the windows where those echo's go is hidden, no screen updates have to be done, so there is less to do, so it takes much less time...

In the script below I added a custom window @blah, you can try to see the difference between this script with the red -n there and without it, making the window minimized or visible.

999test {
if ($window(@blah)) window -c @blah
window -n @blah
var %ba = $ticks
var %i = 1
while (%i < 1000) {
echo @blah Count up to: %i
inc %i 1
}
var% test = $calc($ticks - %ba)
msg $chan $me took $calc(%test / 1000) seconds to count to 1000
}