Speed up enum casts