Checks if the array p matches the subarray of t starting at pos. Note that backward iteration. There are [other](https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm#Tuning_the_comparison_loop) approaches possible.
(pos int, t, p []rune)
| 41 | // There are [other](https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm#Tuning_the_comparison_loop) |
| 42 | // approaches possible. |
| 43 | func isMatch(pos int, t, p []rune) bool { |
| 44 | j := len(p) |
| 45 | for j > 0 && t[pos+j-1] == p[j-1] { |
| 46 | j-- |
| 47 | } |
| 48 | return j == 0 |
| 49 | } |
| 50 | |
| 51 | func computeShiftMap(t, p []rune) (res map[rune]int) { |
| 52 | res = make(map[rune]int) |