optimize use of .charCodeAt(0) at compile time