1. Re: Math Shortcuts

>Speed demons, note!!! floor() is not fast. On my pentium, one
>million ops for:
> > o1 = floor(34.56)              2.42 seconds         vs
> > o1 = sqrt(34.56)               1.54    "            vs

as per Ralf i also tested against and_bits...
results after many test runs (making sure cache was
flushed etc...) were that and_bits beat floor
by a reasonable margin (1.31 avg versus 1.48)
and (shockingly enough) sqrt -beat- and_bits
by a very significant margin (1.02avg vs 1.32 avg)
soooooooooooooooo
kudos to Rob for his predicition that it would
be near impossible to beat sqrt
and bad coder/bad coder to Rob for floor not
implementing and_bits in its algorithm :)
(jus kiddin) I'm sure you have a very good reason
for not being able to beat and_bits with your
floor routine Rob? hmmmmmm???? *poke* :)

*runs -very- fast to prevent being thwapped*

--Hawke'

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu