1.5 more microseconds, this time by going to Pyrex. Execution time is down to 6.01 for the test, which means the overhead is now a mere 5.25 uS! I also split the dispatch code out of protocols._speedups and into a new dispatch._speedups module. I think I'm now officially done trying to trim time off the "fast path", and can now turn towards optimizing expression calculation times, at least once I come up with an appropriate test. But before that, it'd probably be a good idea to rationalize the built-in errors for "no methods" and "ambiguous methods" so that chained methods can detect when the next method is absent or ambiguous, and so that error messages contain more helpful information. Then finishing the method combiner framework, and adding pattern matching support should probably come before optimizing expression calculation and the other dispatch functions (like dispatch_by_mro).
#!/usr/bin/env python """Distutils setup file""" from setuptools import setup, Feature, Extension, find_packages # Metadata PACKAGE_NAME = "PyProtocols" PACKAGE_VERSION = "1.0a0" HAPPYDOC_IGNORE = ['-i', 'tests', '-i', 'setup', '-i', 'setuptools'] execfile('src/setup/common.py') speedups = Feature( "optional C speed-enhancement modules", standard = True, ext_modules = [ Extension("protocols._speedups", ["src/protocols/_speedups.pyx"]), Extension("dispatch._speedups", ["src/dispatch/_speedups.pyx"]), ] ) setup( name=PACKAGE_NAME, version=PACKAGE_VERSION, description="Open Protocols and Component Adaptation for Python", author="Phillip J. Eby", author_email="peak@eby-sarna.com", license="PSF or ZPL", url="http://peak.telecommunity.com/PyProtocols.html", test_suite = 'protocols.tests.test_suite', package_dir = {'':'src'}, package_data = {'': ['*.txt']}, packages = find_packages('src'), cmdclass = SETUP_COMMANDS, features = {'speedups': speedups} )
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |