Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^3: Irrational numbers

by Anonymous Monk
on Dec 18, 2012 at 15:05 UTC ( #1009390=note: print w/replies, xml ) Need Help??

in reply to Re^2: Irrational numbers
in thread Irrational numbers

It might indeed have a big cost in performance, though it's not so obvious.

You are competing against something that the hardware can do in as little as one cpu cycle. No matter what you do, it will have a huge performance penalty, percentage wise.

Replies are listed 'Best First'.
Re^4: Irrational numbers
by BrowserUk (Pope) on Dec 18, 2012 at 16:04 UTC
    You are competing against something that the hardware can do in as little as one cpu cycle.

    It is actually much worse than that these days. Most physical simulation games lend themselves very nicely to being programmed for GPUs, in which case he would be competing with not just 1 FP calc per cycle, but dozens or even hundreds of FP multiply-add calculations per cycle.

    And a single call to his closure-based lazy irrationals would take hundreds of cycles per digit.

    Even if he dropped into C and avoided Perl's sub call overheads; calculating each digit using a polynomial -- Taylor series or similar -- will still take dozens of cycles.

    We are talking 2 or 3 (even 4!) orders of magnitude slower calculations in order to achieve accuracy that simply isn't required.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009390]
[karlgoethebier]: thao4: Si tout le reste échoue demande en francais ;-) There are some French speaking monks in the monastry...
[erix]: weird: a dev version perl (perl-5.27.9) is released, but git doesn't contain a perl-5.27.10 yet
[karlgoethebier]: ...not me ;-)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2018-02-21 10:04 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (277 votes). Check out past polls.