Earlier quoted context omitted.
Oh really? How much faster would that be?
As much faster as the length of the second string times the difference between an address lookup and a hash table lookup.
The hash table solution is O(n+m). 24 operations on the example. The array solution is O(n+m) and 24 operations. The same.
Your intuition tells you that the array is faster because subconsciously you're making assumptions about implementation details. What if you're in a language like PHP where arrays are implemented as hash tables? What if you're in C, but the hash table implementation uses a resizable array and happens to choose an initial size of 26?