[615] in Coldmud discussion meeting

root meeting help first previous next next in chain last in chain last

Speed ping

daemon@ATHENA.MIT.EDU (Mon Dec 12 13:08:30 1994 )

Date: Mon, 12 Dec 1994 11:06:06 -0700
From: 869683 Gillespie Brandon James <brandon@avon.declab.usu.edu>
To: coldstuff@MIT.EDU

Just a random ping in relation to what would be faster (not in relation
to ticks).

scenario: we have a list of 500 'templates' (used with match_template()).

Is it faster to step through the list executing match_template() on each
template until a match is found.  Or, is it faster to expand the list into
a dictionary (assuming each template has a relative value), where each
template is expanded to all of it's relative values (i.e. "templ?ate" would
be "templ" "templa" "templat" and "template", and "on|or" would be "on" and
"or"), and to then find the match through dictionary["match_against"].

...?

-Brandon