GithubHelp home page GithubHelp logo

collin-v / pymmh3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wc-duck/pymmh3

0.0 3.0 0.0 3.84 MB

a pure python MurmurHash3 implementation.

License: Other

Python 64.17% C 3.51% C++ 32.32%

pymmh3's Introduction

PYMMH3 - a pure python MurmurHash3 implementation.

Build Status

About:

This is a pure python implementation of the murmur3 hash algorithm https://code.google.com/p/smhasher/wiki/MurmurHash3 written for the times when you do not want to muck about building and installing c-modules etc.

As this is pure python performance is FAR from optimal in CPython and if that is required a real c-module such as the one found here at https://pypi.python.org/pypi/mmh3/2.3.1 is absolutely suggested!

However this module performs extremely well in case of pypy(http://pypy.org), an alternative JIT version of python.

Performance:

Bad... we need not say more ;)

But with pypy it is blazing fast compared to mmh3 :D

Testing:

Tested by hashing all lines in Jane Eyre by Charlotte Bronte in both c and with pymmh3.

Usage:

try:
    # try with a fast c-implementation ...
    import mmh3 as mmh3
except ImportError:
    # ... otherwise fallback to this code!
    import pymmh3 as mmh3
    
print mmh3.hash( 'my string of doom!', seed = 1234 )
print mmh3.hash64( 'my string of doom!', seed = 1234 )
print mmh3.hash128( 'my string of doom!', seed = 1234 )
print mmh3.hash_bytes( 'my string of doom!', seed = 1234 )

License:

Murmur3 hash was originally created by Austin Appleby.

pymmh3 was written by Fredrik Kihlander and enhanced by Swapnil Gusani, and is placed in the public domain. The authors hereby disclaim copyright to this source code.

pymmh3's People

Contributors

garnel avatar swapniel99 avatar wc-duck avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.