13 Jun
2012
13 Jun
'12
3:42 a.m.
Hi, I compared the following two in JSC and in v8: A: result = str.match(regex); B: while (regex.exec(str)) ++count; str was about 20M input, and regex was /./gm JSC: A: 618 ms B: 3469 ms V8: A: 2640 ms B: 1833 ms I was quite surprised that although the result is a really huge array, str.match was much faster in JSC. Is there a known reason to that? Can B be improved in JSC? Regards, Zoltan