Type optimization