ENH: compile casting loops with O3 to enable vectorizer

improves performance of some casts by 25%-50%
Merge pull request #4562 from juliantaylor/opt-cast-loop

ENH: compile casting loops with O3 to enable vectorizer