|
Grumpy Beginner
Joined: 24 May 2004 Posts: 10
|
Posted: Fri Jul 28, 2006 3:52 pm
Relative speed of these two triggers? |
I am trying to highlight even hours on my prompt, i've two triggers which can do this:
1. one using #IF (%mod( %1, 2)=0) {#CW 10} to test for even from ~.(%d)hr. match.
2. the other matching ~.{0|2|4.......|22}hr
so since prompts come up quite often, I'd want to use the faster one. Is there any real significant difference between the two? |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Fri Jul 28, 2006 4:35 pm |
would think they'd both be extremely quick.
Best way to check would be to run them 1000 times and timestamp before and after
so have the #if (your code) {#say Yes}
then #say 0
#say 1
#say 2
through to 23
and do that on a loop 50 or so times, and show %secs before and after with each #if pattern |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Jul 28, 2006 10:45 pm |
No significant difference, no. Speed differences only come into play with large, complex settings or when you have large, complex settings files actively running. If you don't HAVE a large settings file with lots of stuff happening all the time, or if you don't have any large, complex settings, speed differences are meaningless.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|