Speed-up generation of compiled type names
This significantly speeds up type generation (see #117).