Speed up JSON decoding by accessing cached type entries out of a for loop