type inference speedups