Use of ch vs. s[i] in switch and default case.

Move the copy of s[i] into ch up so we only access the array of characters once-per-character.