Populating a dictionary, fast

Michael Bacarella mbac at gpshopper.com
Sun Nov 11 11:10:45 EST 2007


> Steven D'Aprano wrote:
> > (2) More memory will help avoid paging. If you can't get more memory,
 try 
> > more virtual memory. It will still be slow, but at least the
 operating 
> > system doesn't have to try moving blocks around as much.
>
> Based on his previous post, it would seem he has 7GB of RAM (with about
 
> 5GB free) and 2GB of swap. I don't think RAM is the issue.
>
> Maybe there's something wrong with his specific Python installation. 
> What version is it and was it compiled by him?


This version:

$ python
Python 2.3.4 (#1, May  2 2007, 19:18:17)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

$ rpm -qi python
Name        : python                       Relocations: (not relocatable)
Version     : 2.3.4                             Vendor: CentOS
Release     : 14.4                          Build Date: Wed 02 May 2007 07:20:29 PM EDT
Install Date: Mon 04 Jun 2007 05:48:29 PM EDT      Build Host: builder6
Group       : Development/Languages         Source RPM: python-2.3.4-14.4.src.rpm
Size        : 21137194                         License: PSF - see LICENSE
Signature   : DSA/SHA1, Sat 05 May 2007 09:33:49 AM EDT, Key ID a53d0bab443e1821
URL         : http://www.python.org/

$ uname -a
Linux xxx 2.6.9-22.ELsmp #1 SMP Sat Oct 8 21:32:36 BST 2005 x86_64 x86_64 x86_64 GNU/Linux


We've also tried it on this version (on a different machine):

$ python
Python 2.4.3 (#1, Mar 14 2007, 19:01:42)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

$ rpm -qi python
Name        : python                       Relocations: (not relocatable)
Version     : 2.4.3                             Vendor: CentOS
Release     : 19.el5                        Build Date: Wed 14 Mar 2007 11:06:42 PM UTC
Install Date: Mon 29 Oct 2007 07:03:16 PM UTC      Build Host: builder6
Group       : Development/Languages         Source RPM: python-2.4.3-19.el5.src.rpm
Size        : 22087600                         License: PSF - see LICENSE
Signature   : DSA/SHA1, Wed 04 Apr 2007 12:26:58 AM UTC, Key ID a8a447dce8562897
URL         : http://www.python.org/
Summary     : An interpreted, interactive, object-oriented programming language.

$ uname -a
Linux yyy 2.6.18-8.el5 #1 SMP Thu Mar 15 19:46:53 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux





More information about the Python-list mailing list