Pseudoisotopy theorem: Difference between revisions
en>Brad7777 removed Category:Differential topology; added Category:Theorems in differential topology using HotCat |
en>BG19bot m WP:CHECKWIKI error fix for #61. Punctuation goes before References. Do general fixes if a problem exists. - using AWB (8853) |
||
Line 1: | Line 1: | ||
< | {{Use dmy dates|date=January 2012}} | ||
'''MurmurHash''' is a non-[[Cryptographic hash function|cryptographic]] [[hash function]] suitable for general hash-based lookup.<ref name="Hadoop">{{cite web|url=http://hbase.apache.org/docs/current/api/org/apache/hadoop/hbase/util/MurmurHash.html |title=Hadoop in Java |publisher=Hbase.apache.org |date=24 July 2011 |accessdate=13 January 2012}}</ref><ref>[http://laboratorios.fi.uba.ar/lsi/chouza-tesisingenieriainformatica.pdf Chouza et al].</ref><ref>{{cite web|url=http://www.inesc-id.pt/ficheiros/publicacoes/5453.pdf |title=Couceiro et al. |format=PDF |language={{pt icon}} |accessdate=13 January 2012}}</ref> It was created by Austin Appleby in 2008,<ref>{{cite web|url=http://murmurhash.googlepages.com/ |title=MurmurHash on GooglePages |publisher=Murmurhash.googlepages.com |accessdate=13 January 2012}}</ref><ref>{{cite web|author=Tanjent (tanjent) wrote,3 March 2008 13:31:00 |url=http://tanjent.livejournal.com/756623.html |title=MurmurHash first announcement |publisher=Tanjent.livejournal.com |accessdate=13 January 2012}}</ref> and exists in a number of variants,<ref name="Murmur160">{{cite web|url=http://simonhf.wordpress.com/2010/09/25/murmurhash160/ |title=MurmurHash2-160 |publisher=Simonhf.wordpress.com |date=25 September 2010 |accessdate=13 January 2012}}</ref> all of which have been released into the public domain. When compared to other popular hash functions, MurmurHash performed well in a random distribution of regular keys.<ref name="StackExchange">{{cite web|url=http://programmers.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed |publisher=stackexchange.com |title=Which hashing algorithm is best for uniqueness and speed}}</ref> | |||
==Variants== | |||
The current version is MurmurHash3,<ref>{{cite web|title=MurmurHash3 on smhasher|url=http://code.google.com/p/smhasher/wiki/MurmurHash3}}</ref><ref name="Horvath">{{cite web | first = Adam | last = Horvath | url = http://blog.teamleadnet.com/2012/08/murmurhash3-ultra-fast-hash-algorithm.html | title = MurMurHash3, an ultra fast hash algorithm for C# / .NET | date = Aug 10, 2012 }}</ref> which yields a 32-bit or 128-bit hash value. | |||
The older MurmurHash2<ref>{{cite web|title=MurmurHash2 on smhasher|url=http://code.google.com/p/smhasher/wiki/MurmurHash2}}</ref> yields a 32-bit or 64-bit value. Slower versions of MurmurHash2 are available for big-endian and aligned-only machines. The MurmurHash2A variant adds the [[Merkle–Damgård construction]] so that it can be called incrementally. There are two variants which generate 64-bit values; MurmurHash64A, which is optimized for 64-bit processors, and MurmurHash64B, for 32-bit ones. MurmurHash2-160 generates the 160-bit hash, and MurmurHash1 is obsolete. | |||
==Implementations== | |||
The canonical implementation is in [[C++]], but there are efficient ports for a variety of popular languages, including [[Python (programming language)|Python]],<ref>{{cite web|url=http://code.google.com/p/pyfasthash/ |title=pyfasthash in Python |publisher=Google |accessdate=13 January 2012}}</ref> [[C (programming language)|C]],<ref>{{cite web|url=http://www.qdecoder.org/qlibc/ |title=C implementation in qLibc by Seungyoung Kim}}</ref> [[C Sharp (programming language)|C#]],<ref name="Horvath"/><ref>{{cite web|last=Landman |first=Davy |url=http://landman-code.blogspot.com/2009/02/c-superfasthash-and-murmurhash2.html |title=Davy Landman in C# |publisher=Landman-code.blogspot.com |accessdate=13 January 2012}}</ref> [[Perl]],<ref>{{cite web|url=http://metacpan.org/module/Digest::MurmurHash |title=Toru Maesaka in Perl |publisher=metacpan.org |accessdate=13 January 2012}}</ref> [[Ruby (programming language)|Ruby]],<ref>{{cite web|author=Bruce Williams <http://codefluency.com>, for Ruby Central <http://rubycentral.org> |url=http://rubyforge.org/projects/murmurhash |title=Ruby |publisher=Rubyforge.org |date=3 May 2009 |accessdate=13 January 2012}}</ref> [[PHP]],<ref>{{cite web|url=http://murmur.vaizard.org/en/ |title=Murmurhash3 PHP extension |publisher=Murmur.vaizard.org |accessdate=13 January 2012}}</ref> [[Haskell (programming language)|Haskell]],<ref>{{cite web|url=http://hackage.haskell.org/package/murmur-hash |title=Haskell |publisher=Hackage.haskell.org |accessdate=13 January 2012}}</ref> [[Scala (programming language)|Scala]],<ref>{{cite web|url=https://github.com/scala/scala/blob/master/src/library/scala/util/hashing/MurmurHash3.scala|title=Scala standard library implementation|date=14 December 2012}}</ref> [[Java (programming language)|Java]],<ref>[http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/hash/Hashing.html MurmurHash3 in Java], part of Guava</ref><ref>[http://dmy999.com/article/50/murmurhash-2-java-port Derek Young in Java], public domain</ref> [[Erlang (programming language)|Erlang]],<ref>[https://github.com/bipthelin/murmerl3 MurmurHash3 in Erlang]</ref> and [[JavaScript]].<ref>{{cite web|author=raycmorgan (owner) |url=http://gist.github.com/588423 |title=Javascript implementation by Ray Morgan |publisher=Gist.github.com |accessdate=13 January 2012}}</ref><ref>{{cite web|author=garycourt |url=http://github.com/garycourt/murmurhash-js |title=MurmurHash.js by Gary Court |publisher=Github.com |accessdate=13 January 2012}}</ref> | |||
It has been adopted into a number of open-source projects, most notably libstdc++ (ver 4.6), Perl,<ref>{{cite web|url=http://search.cpan.org/~drolsky/perl-5.17.7/pod/perl5176delta.pod#New_hash_function_Murmurhash-32_%28v3%29 |title=perl5176delta |accessdate=31 December 2012}}</ref> nginx (ver 1.0.1),<ref>{{cite web|url=http://nginx.org/en/CHANGES |title=nginx |accessdate=13 January 2012}}</ref> [[Rubinius]],<ref>{{cite web|url=https://github.com/rubinius/rubinius/commit/1d69526c484cc9435a7198e41b8995db6c3acf1a |title=Rubinius |accessdate=29 February 2012}}</ref> libmemcached (the [[C (programming language)|C]] driver for [[Memcached]]),<ref>[http://libmemcached.org/libMemcached.html libmemcached]</ref> maatkit,<ref>{{cite web|url=http://code.google.com/p/maatkit/source/detail?r=3273 |title=maatkit |publisher=Google |date=24 March 2009 |accessdate=13 January 2012}}</ref> [[Hadoop]],<ref name="Hadoop"/> Kyoto Cabinet,<ref>{{cite web|url=http://fallabs.com/kyotocabinet/spex.html |title=Kyoto Cabinet specification |publisher=Fallabs.com |date=4 March 2011 |accessdate=13 January 2012}}</ref> [[RaptorDB]],<ref>{{cite web|last=Gholam |first=Mehdi |url=http://www.codeproject.com/KB/database/RaptorDB.aspx |title=RaptorDB CodeProject page |publisher=Codeproject.com |date=13 November 2011 |accessdate=13 January 2012}}</ref> [[OlegDB]],<ref>{{cite web|url=https://olegdb.org/documentation.html |title=OlegDB Documentation |accessdate=24 January 2013}}</ref> and [[Apache Cassandra|Cassandra]].<ref>{{cite web|url=http://wiki.apache.org/cassandra/Partitioners|title=Partitioners|publisher=apache.org |date=2013-11-15|accessdate=2013-12-19}}</ref> | |||
==Algorithm== | |||
Murmur3_32(''key'', ''len'', ''seed'') | |||
// Note: In this version, all integer arithmetic is performed with unsigned 32 bit integers. | |||
// In the case of overflow, the result is constrained by the application of modulo <math>2^{32}</math> arithmetic. | |||
''c1'' <math>\gets</math> 0xcc9e2d51 | |||
''c2'' <math>\gets</math> 0x1b873593 | |||
''r1'' <math>\gets</math> 15 | |||
''r2'' <math>\gets</math> 13 | |||
''m'' <math>\gets</math> 5 | |||
''n'' <math>\gets</math> 0xe6546b64 | |||
''hash'' <math>\gets</math> seed | |||
for each fourByteChunk of key | |||
k <math>\gets</math> fourByteChunk | |||
k <math>\gets</math> k * c1 | |||
k <math>\gets</math> (k << r1) '''OR''' (k >> (32-r1)) | |||
k <math>\gets</math> k * c2 | |||
hash <math>\gets</math> hash '''XOR''' k | |||
hash <math>\gets</math> (hash << r2) '''OR''' (hash >> (32-r2)) | |||
hash <math>\gets</math> hash * m + n | |||
with any remainingBytesInKey | |||
remainingBytes <math>\gets</math> SwapEndianOrderOf(remainingBytesInKey) | |||
// Note: Endian swapping is only necessary on big-endian machines. | |||
// The purpose is to place the meaningful digits towards the low end of the value, | |||
// so that these digits have the greatest potential to affect the low range digits | |||
// in the subsequent multiplication. Consider that locating the meaningful digits | |||
// in the high range would produce a greater effect upon the high digits of the | |||
// multiplication, and notably, that such high digits are likely to be discarded | |||
// by the modulo arithmetic under overflow. We don't want that. | |||
remainingBytes <math>\gets</math> remainingBytes * c1 | |||
remainingBytes <math>\gets</math> (remainingBytes << r1) '''OR''' (remainingBytes >> (32 - r1)) | |||
remainingBytes <math>\gets</math> remainingBytes * c2 | |||
hash <math>\gets</math> hash '''XOR''' remainingBytes | |||
hash <math>\gets</math> hash '''XOR''' len | |||
hash <math>\gets</math> hash '''XOR''' (hash >> 16) | |||
hash <math>\gets</math> hash * 0x85ebca6b | |||
hash <math>\gets</math> hash '''XOR''' (hash >> 13) | |||
hash <math>\gets</math> hash * 0xc2b2ae35 | |||
hash <math>\gets</math> hash '''XOR''' (hash >> 16) | |||
==References== | |||
{{reflist|colwidth=30em}} | |||
==See also== | |||
*[[Fowler–Noll–Vo hash function]] | |||
*[[Jenkins hash function]] | |||
*[[CityHash]] | |||
{{DEFAULTSORT:Murmurhash}} | |||
[[Category:Hash functions]] |
Revision as of 09:23, 9 January 2013
30 year-old Entertainer or Range Artist Wesley from Drumheller, really loves vehicle, property developers properties for sale in singapore singapore and horse racing. Finds inspiration by traveling to Works of Antoni Gaudí. MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup.[1][2][3] It was created by Austin Appleby in 2008,[4][5] and exists in a number of variants,[6] all of which have been released into the public domain. When compared to other popular hash functions, MurmurHash performed well in a random distribution of regular keys.[7]
Variants
The current version is MurmurHash3,[8][9] which yields a 32-bit or 128-bit hash value.
The older MurmurHash2[10] yields a 32-bit or 64-bit value. Slower versions of MurmurHash2 are available for big-endian and aligned-only machines. The MurmurHash2A variant adds the Merkle–Damgård construction so that it can be called incrementally. There are two variants which generate 64-bit values; MurmurHash64A, which is optimized for 64-bit processors, and MurmurHash64B, for 32-bit ones. MurmurHash2-160 generates the 160-bit hash, and MurmurHash1 is obsolete.
Implementations
The canonical implementation is in C++, but there are efficient ports for a variety of popular languages, including Python,[11] C,[12] C#,[9][13] Perl,[14] Ruby,[15] PHP,[16] Haskell,[17] Scala,[18] Java,[19][20] Erlang,[21] and JavaScript.[22][23]
It has been adopted into a number of open-source projects, most notably libstdc++ (ver 4.6), Perl,[24] nginx (ver 1.0.1),[25] Rubinius,[26] libmemcached (the C driver for Memcached),[27] maatkit,[28] Hadoop,[1] Kyoto Cabinet,[29] RaptorDB,[30] OlegDB,[31] and Cassandra.[32]
Algorithm
Murmur3_32(key, len, seed) // Note: In this version, all integer arithmetic is performed with unsigned 32 bit integers. // In the case of overflow, the result is constrained by the application of modulo arithmetic. c1 0xcc9e2d51 c2 0x1b873593 r1 15 r2 13 m 5 n 0xe6546b64 hash seed for each fourByteChunk of key k fourByteChunk k k * c1 k (k << r1) OR (k >> (32-r1)) k k * c2 hash hash XOR k hash (hash << r2) OR (hash >> (32-r2)) hash hash * m + n with any remainingBytesInKey remainingBytes SwapEndianOrderOf(remainingBytesInKey) // Note: Endian swapping is only necessary on big-endian machines. // The purpose is to place the meaningful digits towards the low end of the value, // so that these digits have the greatest potential to affect the low range digits // in the subsequent multiplication. Consider that locating the meaningful digits // in the high range would produce a greater effect upon the high digits of the // multiplication, and notably, that such high digits are likely to be discarded // by the modulo arithmetic under overflow. We don't want that. remainingBytes remainingBytes * c1 remainingBytes (remainingBytes << r1) OR (remainingBytes >> (32 - r1)) remainingBytes remainingBytes * c2 hash hash XOR remainingBytes hash hash XOR len hash hash XOR (hash >> 16) hash hash * 0x85ebca6b hash hash XOR (hash >> 13) hash hash * 0xc2b2ae35 hash hash XOR (hash >> 16)
References
43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.
See also
- ↑ 1.0 1.1 Template:Cite web
- ↑ Chouza et al.
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ 9.0 9.1 Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ MurmurHash3 in Java, part of Guava
- ↑ Derek Young in Java, public domain
- ↑ MurmurHash3 in Erlang
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ libmemcached
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web