code: def _fast_crc(count=50):
      
      import timeit
  
      setup = 'import numpy, zlib;'
      setup += 'd = numpy.random.random((500,3));'
  
      crc32 = timeit.timeit(setup=setup,
                            stmt='zlib.crc32(d)',
                            number=count)
      adler32 = timeit.timeit(setup=setup,
                              stmt='zlib.adler32(d)',
                              number=count)
      if adler32 < crc32:
          return zlib.adler32
      else:
          return zlib.crc32
docs: On certain platforms/builds zlib.adler32 is substantially
      faster than zlib.crc32, but it is not consistent across
      Windows/Linux/OSX.
  
      This function runs a quick check (2ms on my machines) to
      determine the fastest hashing function available in zlib.
  
      Parameters
      ------------
      count: int, number of repetitions to do on the speed trial
  
      Returns
      ----------
      crc32: function, either zlib.adler32 or zlib.crc32