On Mon, Oct 02, 2006, "Martin v. L?wis" wrote: > Michael Hudson schrieb: >> >> I think most of >> the code posted so far has been constant time, at least in terms of >> instruction count, though some might indeed be fairly slow on some >> processors -- conversion from double to integer on the PowerPC >> involves a trip off to memory for example. > > Kristian's code testing only for integers in a range would be of > that kind. Code that tests for a list of literals determined > at compile time typically needs time "linear" with the number of > special-cased constants (of course, as that there is a fixed > number of constants, this is O(1)).
What if we do this work only on float()? -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "LL YR VWL R BLNG T S" -- www.nancybuttons.com _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com