Just because you've made your algorithm 1e200 times faster does not mean that you can't improve it any further. It just means you are in a whole new performance scope.

The other week, I moved from an O(n^2) to an O(n) algorithm and saved an arbitrarily large amount of time.
(On the old "patience" sample data, it was a 30,000% speedup after the extra overhead costs. On the new "quick" sample data it would have been a 120,000% improvement. There is no sample big enough to qualify as "patience" anymore.)
Then the next week, I made another 2x improvement.

If you think about it as running in 0.0004 time vs 0.0008 time, you're playing to the pessimist in you with math and psychology tricks.
That extra 2x improvement was still well worth doing!


In reply to Re^4: how to speed up program dealing with large numbers? by SuicideJunkie
in thread how to speed up program dealing with large numbers? by Solarplight

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.