case-sensitive regex vs case-insensitive regex (v2)

Revision 2 of this benchmark created on


Setup

var string1 = 'function name(arg1, arg2) { [native code] }';
    var string2 = 'FUNCTION NAME(arg1, arg2) { [native code] }';
    var sensitive = /function\s?(.*?)(?:\(.*?\))\s?{/;
    var insensitive = /function\s?(.*?)(?:\(.*?\))\s?{/i;

Test runner

Ready to run.

Testing in
TestOps/sec
case-sensitive
sensitive.exec(string1);
sensitive.exec(string2);
ready
case-insensitive
insensitive.exec(string1);
insensitive.exec(string2);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.