Re: spell sorting

From: The Merciless Lord of Everything (serces@mud.dk)
Date: 10/27/00


On Fri, 27 Oct 2000, Sean Holt-Carden wrote:

> i've removed spell_sort_info[] from the list_skills() function does
> anyone know how i can sort the spells in name succession without
> having to write 50 lines of crappy code?
Instead of using Qsort or another "on-the-fly" sorting routing, make a
routing that sorts the spells at bootup time instead (Of course qsort can
be used for this :). Drop it into an Array and then when players request
it, you don't waste valuable CPU time sorting. It will of course slow your
bootup time with an unknown factor, but I gather we're at miliseconds :)

Just my 2 cents

/S

Sir Alec Guinness
 - May the force be with you, Always!


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT