Cheetah Cub: Hashmap

The HashMap component provides a fast mechanism for encoding a wide data word (such as an 8-char instrument code) down to an 8-bit ID (the key). It provides translation in both directions. A typical use would be to translate market instrument data codes to 8 bit instrument-IDs which are used internally in Algo Modules (and Cheetah Block) components.

The HashMap component forms part of the Cheetah Cubs library which provides components for making your own event processing Algo Modules.


Hashmap provides a mechanism to translate bidirectionally between a 64 bit wide code and an 8 bit narrow ID (the hashkey).

A hashcode function is used to do the initial mapping and the choice of function will influence the number of ID collisions for a given application. You can provide your own hashcode function or use the one out of the box.

The HashMap component has been optimised to provide concurrent assessment of up to four collisions and so can perform the translation from 64 bit code to 8 bit key in a single cycle (providing the number of collisions is 4 or less).

Decoding from 8 bit ID to 64 bit code always takes just one cycle.

The HashMap can be used on its own to generate unique IDs from wide codes, or can easily combined with the TickStore component to make a full hashmap component.

Copyright(c) 2016 Cheetah Solutions Pty Ltd

Patent Pending 61739845