From WikiChip
Difference between revisions of "mirc/optimization"
< mirc

m (Ouims moved page mirc/optization to mirc/optimization)
(Outlining data to be filled in at a later date)
Line 1: Line 1:
mIRC is not the fastest language. More often than never, the easiest way to implement something is also not the fastest way to do it.
+
mIRC is not considered a fast language and, more often than not, the easiest implementation is not the fastest.
  
There are various tips you can use to get your script to run faster.
+
The following tips will help to increase the execution speed of a script. Most will have a very marginal speed advantage and, as such, may not be worth the hassle outside of long-running script blocks such as loops.
  
== $iif ==
 
  
$iif is much slower than using a normal condition, if you are using $iif once inside an on text event, it won't make a big difference, but inside a loop with a lot of iterations, it will, use /if and /else.
+
== Custom alias bypassing ==
 +
When calling any form of command or identifer mIRC attempts to find a scripted version prior to looking for native functionality. This can be bypassed by prefixing commands with ! and by inserting a ~ after the $ of identifers
 +
 
 +
 
 +
== if Syntax ==
 +
 
 +
 
 +
== if-else vs $iif() ==
 +
 
 +
$iif() is much slower than using an if-else statement. When $iif() is evaluated it is first rearranged into an if-else statement and the resulting if-else statement is parsed.
 +
 
 +
 
 +
== /tokenize & $n vs $gettok() ==

Revision as of 21:41, 15 December 2015

mIRC is not considered a fast language and, more often than not, the easiest implementation is not the fastest.

The following tips will help to increase the execution speed of a script. Most will have a very marginal speed advantage and, as such, may not be worth the hassle outside of long-running script blocks such as loops.


Custom alias bypassing

When calling any form of command or identifer mIRC attempts to find a scripted version prior to looking for native functionality. This can be bypassed by prefixing commands with ! and by inserting a ~ after the $ of identifers


if Syntax

if-else vs $iif()

$iif() is much slower than using an if-else statement. When $iif() is evaluated it is first rearranged into an if-else statement and the resulting if-else statement is parsed.


/tokenize & $n vs $gettok()