RESOLVED FIXED 38988
Avoid to store the beginning of the match on the stack in Yarr JIT
https://bugs.webkit.org/show_bug.cgi?id=38988
Summary Avoid to store the beginning of the match on the stack in Yarr JIT
Peter Varga
Reported 2010-05-12 06:22:05 PDT
The current JIT solution stores and changes the start character position of the whole pattern's match on the stack. To store the beginning of the match directly in the output array can be a better solution because this value doesn't need to be available by the use of the stack pointer.
Attachments
proposed patch (4.27 KB, patch)
2010-05-12 06:25 PDT, Peter Varga
no flags
Peter Varga
Comment 1 2010-05-12 06:25:47 PDT
Created attachment 55838 [details] proposed patch
Eric Seidel (no email)
Comment 2 2010-06-12 21:01:54 PDT
Ping? Any YARR JIT reviewers care able to review this simple patch?
Geoffrey Garen
Comment 3 2010-06-14 11:50:15 PDT
Peter, can you post performance test results? For this patch, I would test SunSpider and v8-regexp.
Geoffrey Garen
Comment 4 2010-06-14 11:50:46 PDT
Comment on attachment 55838 [details] proposed patch Code looks good, but I'm going to say r- for now, waiting on performance numbers.
Peter Varga
Comment 5 2010-06-15 09:31:15 PDT
Comment on attachment 55838 [details] proposed patch We don't need to do this allocation on stack, so this patch solves the removed TODO. It saves sizeof(int) bytes from stack per matching. In fact, this patch doesn't even have effect on performance, it improves the memory usage. Btw, the performance results are: ref mod regexp-dna: 22.4ms +/- 1.6% 22.4ms +/- 1.6% v8-regexp: 445.9ms +/- 2.6% 444.5ms +/- 2.6% I set to r? again.
Geoffrey Garen
Comment 6 2010-06-15 09:47:32 PDT
Comment on attachment 55838 [details] proposed patch r=me
Peter Varga
Comment 7 2010-06-16 01:42:53 PDT
Comment on attachment 55838 [details] proposed patch Thanks Geoffrey. cq removed to land it manually.
Andras Becsi
Comment 8 2010-06-16 01:53:17 PDT
Comment on attachment 55838 [details] proposed patch Sending JavaScriptCore/ChangeLog Sending JavaScriptCore/yarr/RegexJIT.cpp Transmitting file data .. Committed revision 61244. Clearing flags. (In reply to comment #7) > (From update of attachment 55838 [details]) > Thanks Geoffrey. > cq removed to land it manually.
Andras Becsi
Comment 9 2010-06-16 01:54:49 PDT
All reviewed patches landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.