On 9 March 2013 01:59, Ariya Hidayat <ariya.hida...@gmail.com> wrote:
> If you check Yusuke's links, that is exactly what Esprima is doing. > The use of regular expression is reserved only for the slow/uncommon > code path. Yeah I can see you are converting a char code into a string using fromCharCode and comparing it against a regex which is slower and I showed you a function that checks non-alpha variables using charcodes. BTW your isWhiteSpace function also calls to functions indexOf/fromCharcode when it doesn't need to and also indexOf starts at 0 so you have to check if it's greater than -1.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss