Fastest Trigger Types

Post Reply
rand
Posts: 2
Joined: Sat Jan 04, 2020 2:08 am

Fastest Trigger Types

Post by rand » Sat Jan 04, 2020 2:16 am

For someone in the know, what is the order from fastest to slowest of the following trigger types?

Start of line (fastest?)
Exact Match or Substring (middle?)
Regex (slowest)

I read somewhere that substring is, but that sounds illogical (assuming I understand correctly). Start of line should instantly reject entire lines if the first character doesn't match, where as substring would have to check an entire line before moving to the next.

If I am way off base (very possible) please explain.

Thanks!

User avatar
demonnic
Posts: 595
Joined: Sat Dec 05, 2009 3:19 pm

Re: Fastest Trigger Types

Post by demonnic » Wed Jan 08, 2020 12:16 am

From fastest to slowest:

Exact Match/Start of line are just about the same, as they both fail as you describe
substring
regex

and I forget where the lua/prompt/color trigger types fit in with all that. The start of line and exact match are the fastest, followed by substring, Then really all the other types sort of fall into the same general lump of "slower than the substring types."
They all match pretty quickly though. That being said, using start of line/exact match/substring triggers to shield/gate off your regex triggers definitely gives performance increases in trigger matching time.

User avatar
Vadi
Posts: 4733
Joined: Sat Mar 14, 2009 3:13 pm

Re: Fastest Trigger Types

Post by Vadi » Mon Jan 20, 2020 9:27 pm

I think Lua is last after regex, with regex being the 2nd slowest. Haven't run the benchmarks in a while though!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest