JPerf

JPerf is a Java library, a perfect hash function generator.
Download

JPerf Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Shevek
  • Publisher web site:
  • http://www.anarres.org/projects/jperf/

JPerf Tags


JPerf Description

JPerf is a Java library, a perfect hash function generator. JPerf is a Java library, a perfect hash function generator.Perfect hashing is much written about but less often used. The principle is to reduce the average constant overhead of a hash table by precomputing a hash function which is optimal for the key set. Other advantages include a reduction in memory usage. % Finding such a hash function is hard, especially in the general case and these run-time savings come at a cost of increased map creation time.Users of the C programming language will no doubt be familiar with gperf, a much more complete tool which generates C source for a perfect hash. Douglas C Schmidt's paper was an invaluable resource in the creation of this library.Using the LibraryThe structure of this library is as follows: The user creates a PerfectMapGenerator, adds the key-value pairs to it, and then asks the generator to create a Map. The returned Map is a perfect hash for the given keys and values. The JPerf library offers a general purpose PerfectMapGenerator for Java Objects, and a special case for Java Strings.Future versions of this library may also generate source code, or even a Class at runtime using the asm library. However, the nature of Java is such that these options may not offer much (if any) runtime performance benefit over the generated Map, and the only cost saved is that of generation time (which may be significant). Requirements: · Java 1.5


JPerf Related Software