This is a request for a closer look. Basically, optimization if possible!
There seems to be, and has been for a long time, a massive difference in the speed between $bfind(&bvar,1,string).text and $bfind(&bvar,1,115 116 114 105 110 103).
I understand they're doing something different, but the difference seems way too massive to be normal.
test #1: 1360 <-- $bfind().text
test #2: 219 <-- $bfind
test #3: 171 <-- $wildtok & $findtok at the same time for fun!
alias test1 {
set -l %ticks $ticks
set -l %x 10000
bset -t &bvar -1 $teststring
while (%x) {
noop $bfind(&bvar,1,multi-user).text
dec %x
}
echo -a test #1: $calc($ticks - %ticks)
}
alias test2 {
set -l %ticks $ticks
set -l %x 10000
bset -t &bvar -1 $teststring
while (%x) {
noop $bfind(&bvar,1,109 117 108 116 105 45 117 115 101 114)
dec %x
}
echo -a test #2: $calc($ticks - %ticks)
}
alias test3 {
set -l %ticks $ticks
set -l %x 10000
set -l %string $teststring
while (%x) {
noop $wildtok(%string,multi-user,1,32) $findtok(%string,multi-user,1,32)
dec %x
}
echo -a test #3: $calc($ticks - %ticks)
}
alias teststring {
return mIRC is a full featured Internet Relay Chat client for Windows that $&
can be used to communicate, share, play or work with others on IRC $&
networks around the world, either in multi-user group conferences $&
or in one-to-one private discussions.
}