An array of types by index would almost certainly be faster. Allocate a 25 slot array and return the type from the array slot with that index.