Speed up using typed memory views