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
Oracle
Apprentice


Joined: 29 May 2002
Posts: 121

PostPosted: Wed Mar 31, 2004 9:37 pm   

ismember() vs db()
 
Anyone know if there is any difference in performance between ismember() vs db() functions?

I'm thinking db() would be faster since it is indexed where ismember() does a search from beginning to end to find the result in the stringlist.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Mar 31, 2004 10:56 pm   
 
Since they aren't interchangeable, it probably doesn't matter which is faster. The important question is whether your variable is a list or a record.

Oh, the correct comparisons would be %ismember/%iskey and %item/%db.
Reply with quote
Oracle
Apprentice


Joined: 29 May 2002
Posts: 121

PostPosted: Thu Apr 01, 2004 1:24 am   
 
The variable is a list when using ismember() and it is a record when using db().

I'll look into the %item and %iskey and see how they are different. I have read the instructions in the past but like all kinds with so many different options, I get tired of making changes all the time when I see something different..
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