improved performance in TypeInstance