« OAI harvesting problems | Main | Fascinated by remote apps »

64-bit Python

Python We've been using the beta version of Python 2.5 on some new 64-bit Linux boxes compiled for 64-bit addresses.  This means no more two gigabyte limits (actually we were seldom able to use much more than one gigabyte before).  The other day we actually created a 4,000,000,000 byte string.  The machines actually have six gigabytes of memory on them, so our attempt at creating an 8 billion byte string (by making the string Unicode) looked like it was going to work, but took longer than we were willing to wait.  Older versions of Python have been compilable as 64-bit, but 2.5 looks like it has fixed a lot of 64-bit related bugs.

Being able to read larger files directly into memory is already changing some of our approaches to name-matching problems.  Four million bibliographic records fit into memory with room to spare.

One of the reasons we started using Python 2.5 before its expected final release in August is that it includes SQLite.  SQLite does have some limitations, but on one of our workstations we have been able to load all 60 million records of a January copy of WorldCat into a table indexed by OCLC number very quickly (about 6,600 records/second).  SQLite runs as an embedded database, that is each application using a SQLite database directly opens the files up (most databases run as servers and incur interprocess communication overhead).  This is also where we ran into one of its limitations: at least on our Linux nodes this doesn't work if the file is NFS mounted.

In general, though, we like it.  SQLite looks like it a reasonable alternative if you want an embedded database, and probably your best alternative if you are also working in Python.  Don't forget to do a 'commit' before you exit!

--Th

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83459bf2269e200e55085cfe78834

Listed below are links to weblogs that reference 64-bit Python:

Comments

How long did it take you to type that string?

I view the 'commit' issue as at least a documentation bug.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.

My Photo

June 2009

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30