On Fri, 21 Apr 2006 20:51:59 -0600, "Levi Pearson" <[EMAIL PROTECTED]> said: > Anyway, what O-notation doesn't tell you is what the constant factors > in the algorithm are. It's all about how the algorithm scales. This > means that if you know your problem will always be a certain size, > the optimal algorithm might be different than if you know your > problem set will grow, depending on the constant factors.
However, PHP is brain-damaged and implements lists as hashes whose keys are the counting numbers. (In PHP terminology, both lists and hashes are "arrays.") So in PHP, looking something up in a hash _is_ always faster than searching a list, since the search is a series of hash lookups. -Jonathan -- C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
