Interesting Natural Number Permutation

Posted:
in Current Mac Hardware edited January 2014
Safari seems to do better on this test from a math contest, although the script does not look very heavily optimized.



In a way it is sort of like a performance speed test, since it reports milliseconds required to perform the calculations.



http://www.myersdaily.org/joseph/jav...peed/pn-1.html



Default N = 5.



Try setting N = 7 or N = 8 if you want to have a larger test.

Comments

  • Reply 1 of 12




    Thats what I get from my work PC...
  • Reply 2 of 12
    lucaluca Posts: 3,833member
    28 ms when N = 5



    203 ms when N = 6



    1300 ms when N = 7



    11700 ms when N = 8



    This is in Safari.
  • Reply 3 of 12
    snoopysnoopy Posts: 1,901member
    N = 5



    289 ms on a 233 MHz Beige G3 with Camino.
  • Reply 4 of 12
    snoopysnoopy Posts: 1,901member
    Okay, this is a 1.6 GHz G5 and Safari:



    N = 5 yields 18 ms



    N = 8 yields 5846 ms



    What computer you run makes the most difference.
  • Reply 5 of 12
    Beige 266 G3, iCab



    n = 5 gave 426 to 432 ms (I ran it three times).



    However, these were deeply meaningful milliseconds and I will cherish them forever. I pitty you folks who can't share so much time with your Mac!
  • Reply 6 of 12
    kanekane Posts: 392member
    My setup is an AMD Athlon XP 1.6GHz running Mozilla Firebird



    N = 5 : 31 ms



    N = 8 : 13265 ms





    That 1.6GHz G5 earlier in the thread is wicked fast!
  • Reply 7 of 12
    G4 2x1GHz MDD, Safari:



    N=5: 24 ms

    N=8:8705 ms
  • Reply 8 of 12
    Once again, the browser used can make a big difference...



    Powerbook G4 1Ghz results OS 10.2.6:

    Safari 1.0

    n=5 - 23

    n=6 - 138

    n=7 - 965

    n=8 - 8461

    n=9 - 79,765



    Netscape 7.1

    n=5 - 114

    n=6 - 722

    n=7 - 5199

    n=8 - 41,431



    IE 5.23

    n=5 - 27

    n=6 - 174

    n=7 - 1966

    n=8 - 118,655



    Pentium II -350 mhz Windows 98

    Netscape 7.1

    n=5 - 270

    n=7 - 11860

    n=8 - 94,360



    IE 6

    n=5 - 50

    n=7 - 2810

    n=8 - 26,750
  • Reply 9 of 12
    Athlon XP 3200+ IE 6

    N = 8

    Time 2219 ms
  • Reply 10 of 12
    Pentium 4 2.53GHz laptop

    IE6



    N=5 10ms

    N=6 70ms

    N=7 450ms

    N=8 3876ms



    I'll try my single 1.25 Ghz Power Mac later
  • Reply 11 of 12
    snoopysnoopy Posts: 1,901member
    It would be interesting to know what is being tested? Let's just look at N = 8 results. A 1.6 GHz Athlon XP using Mozilla Firebird took about 13.3 seconds, but a 2.53GHz Pentium 4 laptop using IE 6 took only 3.9 seconds. The math is trivial, just a single multiply in a loop repeated 8 times. On the PowerBook, Safari took 8.5 seconds, Netscape 7.1 took 41.4 seconds and IE 5.23 took 118.7 seconds.
  • Reply 12 of 12
    kanekane Posts: 392member
    Quote:

    Originally posted by KANE

    My setup is an AMD Athlon XP 1.6GHz running Mozilla Firebird



    N = 5 : 31 ms



    N = 8 : 13265 ms





    That 1.6GHz G5 earlier in the thread is wicked fast!




    Tonight I also ran the same test on the same computer running IE 6 instead



    N = 5 : 15 ms



    N = 8 : 6063 ms



    So IE seems a lot more optimized for this task than Mozilla was. Also Safari seems speedy.
Sign In or Register to comment.