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
- HashFieldHash provides a few functions fieldhash and fieldhashes. That’s enough.
- HashFieldHash is faster than HashUtilFieldHash, because its internals use simpler structures.
- 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.