Why is the com being left open unacceptable, especially in this case? If mIRC closes, the com is auto-closed. If wscript.exe is closed then the
com on mIRC will error. Unlike other objects, the usage of this one will not create an unstable state for either mIRC, wscript or the OS
Your benchmark is correct in that tokenize is faster than using bvars but the assumption as to why is incorrect. The reason has nothing to do with the command call at all; the way mIRC handles command evaluation is that it evaluates the input portion then passes the result to the command. The same initial leg work is being done by both /noop and /tokenize. The reason bvars are slow is, I believe, due to having to, internally, convert a binary array into a string and then utf encoding that string before giving a result.
Regardless here's an even faster way (Yes, the com is left open, that's intended):
alias regread {
if (!$~com(regread)) !.comopen regread WScript.Shell
noop $~com(regread,RegRead,3,bstr,$~1)
!return $~com(regread).result
}
edits
1: clarified message
2: "/ " no longer works in place of noop