Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Grumpy
Beginner


Joined: 24 May 2004
Posts: 10

PostPosted: 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?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: 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... ;)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net