HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Yes, an other timer system ...

11-07-2008, 11:05 AM#1
Troll-Brain
EDIT : The code is below, here :
http://www.wc3campaigns.net/showpost...8&postcount=12

It would be great if someone could make a benchmark test, japi doesn't work with me.

It's just for a personal using.
Even if it's the fastest system on the known world, don't worry i won't never submit it as a resource for these reasons :

- There are already many timers systems ...
- It's not really friendly user

What you mustn't do, or break the system :

- Remove a condition without the function OT_End in this condition.
- Don't use the textmacro OT_Init just after the locals declaration (you must use it only ONE time in a same condition).

Thx for your comments.

EDIT : Yes i know i should make debug things, but that's not the question yet.
11-07-2008, 12:37 PM#2
Here-b-Trollz
Where is the part where it actually executes some code?
11-07-2008, 01:03 PM#3
Troll-Brain
Hmm good point :p
I think i will copy Captain Griffen's test for his system.
I will edit the post (but not today i haven't the time, probably tomorrow).
11-07-2008, 05:49 PM#4
Troll-Brain
Hmm it's different to TT and Rapid Timers, i don't use a function to evaluate the conditions.
So it's hard to test, or maybe calling TriggerEvaluate would be an enough good estimation ?
11-07-2008, 08:20 PM#5
Ammorth
A safe benchmark would be having both systems have the same outcome, even if one system requires a different approach.

I can get japi to work, so if you can post or pm me both scripts, ill benchmark them (too lazy to figure what needs to be setup).
11-12-2008, 07:44 PM#6
Troll-Brain
I can not imagine a correct benchmark to compare this system with the other 2 (TT and Rapid Timers).

I think my system would be faster to perform functions, but rather (very?) slow to remove a condition, especially if the latter is at the top of the list and there are many conditions added to the trigger.

Without doing everything, could you give me your opinion, and guide me on how to achieve a proper benchmark?
11-12-2008, 10:02 PM#7
Captain Griffen
Benchmark it...you can do it. Just look at how I benchmarked TT against RT.
11-13-2008, 03:35 PM#8
Troll-Brain
Correct me if i'm wrong, i can test the adding conditions but for running condition i don't use any function, the trigger is running with an event.
So it's not the same and i think call a TriggerEvaluate should be slower than it is, no ?

And for removing a condition i use also a Timer(0.0) so can i do it properly?
11-13-2008, 04:12 PM#9
Captain Griffen
Unless the execution cost increases differently between timer executed triggers and triggerevaluates, then there is no problem.
11-13-2008, 04:22 PM#10
chobibo
I just noticed that the variable i was never declared, it's inside function Remove, anyways good luck.
11-13-2008, 05:27 PM#11
Troll-Brain
Quote:
Originally Posted by chobibo
I just noticed that the variable i was never declared, it's inside function Remove, anyways good luck.
Quote my message and you will see that's a forum bug.
I didn't see him, i will edit my message when the benchmark code will be done.
[ I ] without space like that : ([i]) -> [i]

Anyway i don't need luck just someone to test :p

@Captain Griffen : But is there a way to test it ?
For the benchmark i will assume that there was no difference.
11-15-2008, 04:15 PM#12
Troll-Brain
I hope the execution time of calling TriggerEvaluate is the same as perfom the trigger evaluation with the timer expire event.

The libraries you need for the benchmark :

Expand OT:

Expand TT:

Expand CGTT:

Expand Benchmark:

Plz try it with 50 and 200 conditions added
Don't forget to disable war3err and the debug mode.

Thx in advance.
11-16-2008, 04:09 PM#13
Ammorth
tried to benchmark but the OT_Remove function kept reaching the oplimit (I'm guessing cause of a bad loop). No idea how the system works, but ill see if I can fix it.
11-16-2008, 04:55 PM#14
Troll-Brain
Quote:
Originally Posted by Ammorth
tried to benchmark but the OT_Remove function kept reaching the oplimit (I'm guessing cause of a bad loop). No idea how the system works, but ill see if I can fix it.
Sorry about that ...
I will fix that and pm you.
11-16-2008, 06:03 PM#15
Vexorian
Yeah, all I needed for TimerUtils was for someone to rob the function names and make new functions that are incompatible with it, nice...