May 26, 2018

Lightweight field hash implementation

HashFieldHash provides the field hash mechanism which supports the inside-out technique.

You may know HashUtilFieldHash. It’s a very useful module, but too complex to understand all the functions and only available in 5.10. HUFCompat is available for pre-5.10, but it seems too slow to use.

This is an alternative to HUF with following features

Simpler interface

  • HashFieldHash provides a few functions fieldhash and fieldhashes. That’s enough.

Higher performance

  • HashFieldHash is faster than HashUtilFieldHash, because its internals use simpler structures.

Relic support

  • Although HashFieldHash uses a new feature introduced in Perl 5.10, the uvar magic for hashes described in “GUTS” in HashUtilFieldhash, it supports Perl 5.8 using the traditional tie-hash layer.

WWW http//