Search found 32 matches

by fordpinto
Fri Mar 20, 2020 11:00 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 1326

Re: Fastest Trigger Types

@SlySven I am not familiar with Qt, but I have checked the documentation for the QRegularExpression class you mentioned. If it says what I think it says, then all regular expressions are optimized on first use (unless preemptively optimized by calling the optimize() method you also mentioned). So, a...
by fordpinto
Wed Mar 18, 2020 5:05 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 1326

Re: Fastest Trigger Types

Just a quick note: I found out why the triggers weren't cleaned out in the test script. I mentioned this above, the triggers are "deleted" but Mudlet finalizes the deletion on the next received line rather that immediately. I added that extra line but it did not work and I did not see why. It's my o...
by fordpinto
Tue Mar 17, 2020 6:06 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 1326

Re: Fastest Trigger Types

The test build posted above gives me roughly same throughput numbers as stock 4.6.1
by fordpinto
Mon Mar 16, 2020 7:29 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 1326

Re: Fastest Trigger Types

I have cleaned up and I am attaching an alias that allows to run tests such as trigtest regex trigtest head trigtest exact I do not see the 1,600 trigger limit, so this could be something to do with the older machine I ran it on, or with the MLObj library. As configured now, the alias creates 10,000...
by fordpinto
Mon Mar 16, 2020 5:39 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 1326

Re: Fastest Trigger Types

I am using pre-compiled binaries. Was already thinking to try compiling myself - it's much easier in Linux than any other system I think. Will try to do that as soon as I am done with a mud project I am half way thru on. At any rate - my main takeaway from this is that while Regex performance is cle...
by fordpinto
Sun Mar 15, 2020 1:41 am
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 1326

Re: Fastest Trigger Types

Ran a test using feedTriggers() without adding any triggers to correct for their CPU load in the above tests. Corrected numbers are
Begin of line: 12 million trigger-fails per second
Exact match: 7 million trigger-fails per second
Regex: 5 million trigger-fails per second
by fordpinto
Sat Mar 14, 2020 11:26 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 1326

Re: Fastest Trigger Types

I did a test (and this is done on an ancient i5 machine, numbers should be significantly higher on a modern computer): 1. Begin of line trigger reaches ~7 million trigger-fails per second throughput 2. Exact match trigger reaches ~5 million trigger-fails per second throughput 3. Regex begin of line ...
by fordpinto
Fri Mar 13, 2020 10:24 pm
Forum: Scripts & Packages
Topic: Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects
Replies: 6
Views: 231

Re: Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects

Added Stopwatch object: mySwDef = { stopwatchLabel = "Fight stopwatch" -- only one parameter is needed, and by the "debug" version at that. -- syntax kept for compatibility with other MLObj types } -- creating Stopwatch object -- NOTE: Stopwatch object is always created in a stopped state, I think i...
by fordpinto
Fri Mar 13, 2020 9:56 pm
Forum: Scripts & Packages
Topic: Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects
Replies: 6
Views: 231

Re: Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects

Added Event object: -- creating Event definition eventDef = { name = "My special event", eventLabel = "Handler object for my special event", -- this is ignored by the lean version, -- and can be omitted in full version (taken as "") code = function() echo("My special event just happened!\n") end, on...
by fordpinto
Fri Mar 13, 2020 9:42 pm
Forum: Scripts & Packages
Topic: Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects
Replies: 6
Views: 231

Re: Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects

I realized that I needed Event objects as well, so added it. Added Stopwatch for good measure, but not all of Mudlet API fits within the OO object structure (more comments in a second). Also improved on some logic details (a bit more assert()). Included both the debug and the lean version. Lean vers...