-
msaboff@apple.com authored
Reviewed by Darin Adler. Bug 41238 - RegExp performance slow on Dromaeo benchmark Other javascript engines appear to cache prior results of regular expression operations. Suggest adding some sort of caching mechanism to regular expression processing. Added a single entry cache of match() results to RegExp class. Also added performance improvements to UString == operator. First check the impls for equality. Then get the length of each of the non-null impls. Next check the sizes for equality. Then check the data for the case of different impls that point to the same data (most likely due to substrings from the beginning of another string). Lastly we check the underlying data for equality. Refactored Vector<>::operator=() method into a separate copy() method that it calls. The copy() method is explicitly used for deep copying. * runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::match): * runtime/RegExp.h: * runtime/UString.h: (JSC::operator==): * wtf/Vector.h: (WTF::::operator): (WTF::::copy): 2010-12-09 Michael Saboff <msaboff@apple.com> Reviewed by Darin Adler. Added test to verify proper operation of backtrack labels. https://bugs.webkit.org/show_bug.cgi?id=50579 * fast/regex/parentheses-expected.txt: * fast/regex/script-tests/parentheses.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8bebb7df