// remove non-alphanumerics function innocent(a) { var b=''; for (var i=0; i='A' && c<='Z') || (c>='a' && c<='z') || (c>='0' && c<='9') || c=='_') { b+=c; } } return b; } // 791m (55 chars, 3500 times) // 280m (55 chars, 35 times) for (var i=0; i<3500; ++i) { var n = innocent('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); }