-it will accept a two digit hex number
-the first digit will locate the row of the table (1-F) and the 2nd the column (1-F)
-returns the value of that column/row.
At the moment I have something like this and it is way too slow:
You're looking for a 2D array. The fastest "hash table" out there is just an array, and based on how you need to index it that's exactly what you need.
1 2 3
std::vector<Data> myData (0xFF);
//It doesn't matter if the vector is actually "2D", since every combination of
//"rows" and "columns" has a different index.
To read hex just use:
1 2 3
int index;
std::cin >> std::hex >> index;
myData[index] = 42;
The fastest possible way to do it is a straight, 1D array as suggested.
That said, I cannot imagine what kind of requirements you are under to convert a two-digit hexadecimal value faster than a couple of arithmetic operations for each digit.
Have you really profiled your program or are you playing "human optimizer"?