Psyco on Mac OS X, Take 2

December 25, 2007

In an earlier post, I tried and failed to get Psycho working on my 64-bit Core 2 Duo Macbook Pro. The docs said that Psyco didn’t work on 64-bit machines, but I tried anyway.

I got a comment to that post suggesting I try version 1.6, which was released December 16, 2007. Just did, and it worked like a snap! This is really cool. Here’s the example I tried:

def fib(n):

    if n <= 0: return 0

    if n == 1: return 1

    return fib(n-1) + fib(n-2)

Results? fib(36) in cpython took 17.7 seconds. With psyco it took 0.75 seconds!


One Response to “Psyco on Mac OS X, Take 2”

  1. Gary Says:

    The MacBook Pro does have a 64-bit CPU, but MacOS takes a different approach to 64-bit than Windows and Linux… there are not separate 32- and 64-bit versions of the OS. MacOS can run 32- and 64-bit applications together in one OS version. However, with Psyco, you’re running a 32-bit Python binary, not a 64-bit one. This is definitely true because Psyco doesn’t have a i386 code generator that supports 64-bit opcodes.

    Glad to see someone using Psyco on Mac now… I’m the guy who wrote the patch that got it working 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: