Added gperf notes.
This commit is contained in:
parent
a646050111
commit
1e5c4f0f4b
3
BMZ.t2t
3
BMZ.t2t
@ -21,6 +21,3 @@ Enjoy!
|
||||
Davi de Castro Reis
|
||||
|
||||
Fabiano Cupertino Botelho
|
||||
|
||||
%!include(html): ''LOGO.html''
|
||||
Last Updated: %%date(%c)
|
||||
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 303 B |
3
CHM.t2t
3
CHM.t2t
@ -19,6 +19,3 @@ Enjoy!
|
||||
Davi de Castro Reis
|
||||
|
||||
Fabiano Cupertino Botelho
|
||||
|
||||
%!include(html): ''LOGO.html''
|
||||
Last Updated: %%date(%c)
|
||||
|
@ -22,6 +22,3 @@ Enjoy!
|
||||
Davi de Castro Reis
|
||||
|
||||
Fabiano Cupertino Botelho
|
||||
|
||||
%!include(html): ''LOGO.html''
|
||||
Last Updated: %%date(%c)
|
||||
|
40
GPERF.t2t
Normal file
40
GPERF.t2t
Normal file
@ -0,0 +1,40 @@
|
||||
GPERF versus CMPH
|
||||
|
||||
|
||||
|
||||
You might ask why cmph if [gperf http://www.gnu.org/software/gperf/gperf.html]
|
||||
already works perfectly. Actually, gperf and cmph have different goals.
|
||||
Basically, these are the requirements for each of them:
|
||||
|
||||
|
||||
- GPERF
|
||||
|
||||
- Create very fast hash functions for **small** sets
|
||||
|
||||
- Create **perfect** hash functions
|
||||
|
||||
- CMPH
|
||||
|
||||
- Create very fast hash function for **very large** sets
|
||||
|
||||
- Create **minimal perfect** hash functions
|
||||
|
||||
As result, cmph can be used to create hash functions where gperf would run
|
||||
forever without finding a perfect hash function, because of the running
|
||||
time of the algorithm and the large memory usage.
|
||||
On the other side, functions created by cmph are about 2x slower than those
|
||||
created by gperf.
|
||||
|
||||
So, if you have large sets, or memory usage is a key restriction for you, stick
|
||||
to cmph. If you have small sets, and do not care about memory usage, go with
|
||||
gperf. The first problem is common in the information retrieval field (e.g.
|
||||
assigning ids to millions of documents), while the former is usually found in
|
||||
the compiler programming area (detect reserved keywords).
|
||||
|
||||
----------------------------------------
|
||||
[Home index.html]
|
||||
----------------------------------------
|
||||
|
||||
Davi de Castro Reis
|
||||
|
||||
Fabiano Cupertino Botelho
|
@ -3,7 +3,7 @@ CMPH - C Minimal Perfect Hashing Library
|
||||
|
||||
%!includeconf: CONFIG.t2t
|
||||
|
||||
----------------------------------------
|
||||
-------------------------------------------------------------------
|
||||
|
||||
**Description**
|
||||
|
||||
@ -14,8 +14,8 @@ production-quality and fast API. The library is designed to work with big entrie
|
||||
can not fit in the main memory. It has been used successfully for constructing minimal perfect
|
||||
hashing functions for sets with more than 100 million of keys.
|
||||
Although there is a lack of similar libraries
|
||||
in the free software world, we can point out some of the distinguishable
|
||||
features of cmph:
|
||||
in the free software world ([gperf is a bit different gperf.html]), we can point out some
|
||||
of the distinguishable features of cmph:
|
||||
|
||||
- Fast.
|
||||
- Space-efficient with main memory usage carefully documented.
|
||||
@ -28,7 +28,6 @@ features of cmph:
|
||||
- Well encapsulated API aiming binary compatibility through releases.
|
||||
- Free Software.
|
||||
|
||||
|
||||
----------------------------------------
|
||||
|
||||
**Supported Algorithms**
|
||||
|
Loading…
Reference in New Issue
Block a user