Hi, recently there has been some talk about reducing import times. It seems that the current import strategy for C extensions (i.e. importing the extension at the bottom of the .py file) is quite slow:
==================== import sys for i in range(10000): import decimal del sys.modules('decimal') del sys.modules('_decimal') ==================== With the regular decimal.py the script is about 9 times slower than running it with a modified decimal.py that just contains "from _decimal import *". I don't know enough about the import mechanism to say whether this is a particularly good benchmark. If it is, perhaps we should devise another strategy for loading C extensions. Stefan Krah _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com