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 (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "LL YR VWL R BLNG T S" -- www.nancybuttons.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4