On Wed, 10 Apr 1996, Hades wrote: > Well why would it have to search the files lineraly? To find the target > room? Already though of that. When the world boots up it creates > world_index[]. All world index is is a structure array (kinda like how the > world used to be set up) and when you give it a vnum like so: > world_index[1031].room that is a pointer to room vnum 1031, so there is no > searching on zone resets, which is even FASTER than real_room because even > real_room had to hit a for loop to do a binary search, whereas world_index > just throws me a pointer without any searching. Watch the load on your machine climb when you have to do a large number of vnumber to pointer conversions, such as at start up. If you've found a way to avoid that, tell me. As I mentioned in a previous message, I've done this for mob and obj prototypes (and I've done it for zone structures too, but I figured they don't matter as much), and my real_XXX() functions are still needed to convert vnumbers to pointers. Your scheme will be keeping the CPU real busy. I use hash tables. My CPU is happy. Michael Buselli m-buselli@uchicago.edu http://student-www.uchicago.edu/users/mhbusell/
This archive was generated by hypermail 2b30 : 12/18/00 PST