It has to do with the machine level code that languages are converted to in order to execute. There's a wide range of issues involved, but a simplistic answer is...
The bit representation of upper and lower case letters is different - "c" physically sorts and compares differently from "C". In order to provide case insensitivity, a performance penalty is incurred by every machine level operation as the bit-level code has to be resolved for each instruction.
Compilers resolve these issues as part of the code compilation process by effectively converting all characters to one case. Scripting (asp, javascript, etc) and shell languages incurr the conversion penalty during run time. JavaScript came from the Unix world where performance rules.
KCWebMonkeys point is a good one. Option Explicit and Reverse Polish Notation are your friends.
Edited by dpyers