'import copy' too slow?, was Re: [Python-Dev] implementation of copy standard lib

2005-08-16 Thread Peter Otten
[Martijn Brouwer] > Importing copy takes 5-10 times more time that > import os, string and re together! Are you sure you aren't seeing the effects of caching? My little ad hoc test (which fails on the os module) doesn't confirm your numbers: $ python2.4 -m timeit -n1 -r1 -s"import sys; assert 're

Re: 'import copy' too slow?, was Re: [Python-Dev] implementation of copy standard lib

2005-08-16 Thread Peter Otten
[Martijn Brouwer] > Importing copy takes 5-10 times more time that > import os, string and re together! If your measurement isn't flawed, try again after replacing the following import in copy.py try: from org.python.core import PyStringMap except ImportError: PyStringMap = None with jus