Both modules have a crc32 function.&nbsp; The zlib version is faster when zlib has been compiled optimally or about the same when zlib is old or uses its C code.<br><br>Should we ditch the binascii.crc32 version in py3k?<br><br>
64bit Linux (CentOS 5.1):<br><br>$ python2.4 -m timeit &#39;foo=&quot;abcdefghijklmnop&quot;*10&#39; &#39;import <span style="font-weight: bold;">binascii</span> as mod&#39; &#39;f = mod.crc32&#39; &#39;for x in xrange(100000): f(foo)&#39;<br>
10 loops, best of 3: 108 msec per loop<br>$ python2.4 -m timeit &#39;foo=&quot;abcdefghijklmnop&quot;*10&#39; &#39;import <span style="font-weight: bold;">zlib</span> as mod&#39; &#39;f = mod.crc32&#39; &#39;for x in xrange(100000): f(foo)&#39;<br>
10 loops, best of 3: 40.5 msec per loop<br><br>32bit MacOS X 10.4:<br><br>% python2.3 /usr/lib/python2.3/timeit.py &#39;foo=&quot;abcdefghijklmnop&quot;*10&#39; &#39;import <span style="font-weight: bold;">binascii</span> as mod&#39; &#39;f = mod.crc32&#39; &#39;for x in xrange(100000): f(foo)&#39;<br>
10 loops, best of 3: 7.37e+04 usec per loop<br>% python2.3 /usr/lib/python2.3/timeit.py &#39;foo=&quot;abcdefghijklmnop&quot;*10&#39; &#39;import <span style="font-weight: bold;">zlib</span> as mod&#39; &#39;f = mod.crc32&#39; &#39;for x in xrange(100000): f(foo)&#39;<br>

10 loops, best of 3: 4.62e+04 usec per loop<br>
<br>Removal from binascii would break things for platforms or embedded systems wanting crc32 that don&#39;t want to include zlib.&nbsp; Anyone care?<br><br>What about 2.x?&nbsp; if we remove the redundancy in py3k i guess we deprecate binascii.crc32 and remove in 2.7?<br>
<br>-gps<br>