RE: PPC OSX vs. x86 Linux

Discussion in 'Python' started by Sells, Fred, Apr 9, 2005.

  1. Sells, Fred

    Sells, Fred Guest

    I'm no expert on internals, but I seem to recall that in the past, the
    string module could be implemented in either C or Python and I think there
    is a strop module that is related to all this. Could it be that on the Mac,
    your string processing is using interpreted Python byte code while linux
    uses c?

    -----Original Message-----
    From: Joshua Ginsberg [mailto:]
    Sent: Friday, April 08, 2005 1:03 PM
    To:
    Subject: PPC OSX vs. x86 Linux


    Hello --

    I writing some python code to do some analysis of my mail logs. I took
    a 10,000 line snippet from them (the files are about 5-6 million
    usually) to test my code with. I'm developing it on a Powerbook G4
    1.2GHz with 1.25GB of RAM and the Apple distributed Python* and I
    tested my code on the 10,000 line snippet. It took 2 minutes and 10
    seconds to process that snippet. Way too slow -- I'd be looking at
    about 20 hours to process a single daily log file.

    Just for fun, I copied the same code and the same log snippet to a
    dual-proc P3 500MHz machine running Fedora Core 2* with 1GB of RAM and
    tested it there. This machine provides web services and domain control
    for my network, so it's moderately utilized. The same code took six
    seconds to execute.

    Granted I've got the GUI and all of that bogging down my Mac. However,
    I had nothing else fighting for CPU cycles and 700MB of RAM free when
    my testing was done. Even still, what would account for such a wide,
    wide, wide variation in the time required to process the data file? The
    code is 90% regular expressions and string finds.

    Theories? Thanks!

    -jag


    * versions are:
    Python 2.3 (#1, Sep 13 2003, 00:49:11)
    [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
    and
    Python 2.3.3 (#1, May 7 2004, 10:31:40)
    [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2


    Joshua Ginsberg --
    Brainstorm Internet Network Operations
    970-247-1442 x131
    --
    http://mail.python.org/mailman/listinfo/python-list
     
    Sells, Fred, Apr 9, 2005
    #1
    1. Advertising

  2. Sells, Fred

    Maurice LING Guest

    Sells, Fred wrote:
    > I'm no expert on internals, but I seem to recall that in the past, the
    > string module could be implemented in either C or Python and I think there
    > is a strop module that is related to all this. Could it be that on the Mac,
    > your string processing is using interpreted Python byte code while linux
    > uses c?
    >


    I have a suspicion towards Apple-installed Python, although this
    suspicion may be groundless. I've heard that OSX actually uses the
    installed Python for some of its work. Once I've deleted the
    Apple-installed Python totally and it does screw up some of my
    applications, like I can't click on a doc file and let it fire up
    OpenOffice to open the doc file. At the same time, I'm not sure of the
    Apple-installed Python is the same as if you had installed it from Fink,
    or has it been tweaked...

    If Apple-installed Python is a problem for you, you might want to
    install a version of Python using Fink and see how it compares up...

    Maurice
     
    Maurice LING, Apr 9, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug Crawford

    cross compile python for linux-ppc-604

    Doug Crawford, Jan 11, 2006, in forum: Python
    Replies:
    1
    Views:
    449
    lincr
    Jan 11, 2006
  2. Replies:
    4
    Views:
    410
    Branimir Maksimovic
    Oct 20, 2005
  3. JeanDean
    Replies:
    1
    Views:
    3,827
    Zeppe
    Jul 26, 2007
  4. Aredridel

    compile error on ppc linux

    Aredridel, Aug 30, 2004, in forum: Ruby
    Replies:
    0
    Views:
    105
    Aredridel
    Aug 30, 2004
  5. Robert Nicholson
    Replies:
    0
    Views:
    122
    Robert Nicholson
    Jan 6, 2007
Loading...

Share This Page