> On Wed, 26 Mar 2003, Hiddukel wrote: > > Thank you both for your replies. I changed power to a long long and it > > is working perfectly. I understand that there *could* be a performance > > loss from doing that as you are looping much more times checking invalid > > rooms, however I have run a test using this and generating 100 valid
Well, I was speaking more to the fact that number_range is used quite a bit, and a long long can be quite a bit slower than working with a regular integer, as most compilers are forced to emulate a 64-bit integer. It's not probably going to be a noticable difference, but it's one of those types of things that slowly adds to a MUD using more CPU as you build it up. As far as get_random_room, another thing you could do is number_range(0, top_room), then step through the room hashes that many rooms. Note this is not very clean, but it is very fast.

