Repository navigation
Commit 1984003
committed
[YARR] Unroll the
https://bugs.webkit.org/show_bug.cgi?id=328895
Reviewed by Yusuke Suzuki.
YARR JIT saves the frame slots of a quantified group into a ParenContext
on every iteration and restores them on backtrack. On ARM64 this copy is
unrolled, and a loop is emitted only from 16 slots, copying 8 slots per
iteration. On x86_64 five or more slots were copied by a loop that moves
one slot per iteration, spending 6 instructions per slot.
This patch does the same as ARM64 on x86_64. Fewer than 16 slots are
copied directly, and the loop copies 8 slots per iteration.
Baseline Patched
regexp-parencontext-frame-slots 106.3776+-0.4497 ^ 59.2219+-0.2018 ^ definitely 1.7963x faster
Tests: JSTests/microbenchmarks/regexp-parencontext-frame-slots.js
JSTests/stress/regexp-parencontext-frame-slot-counts.js
* JSTests/microbenchmarks/regexp-parencontext-frame-slots.js: Added.
* JSTests/stress/regexp-parencontext-frame-slot-counts.js: Added.
(shouldBe):
(test):
* Source/JavaScriptCore/yarr/YarrJIT.cpp:
Canonical link: https://commits.webkit.org/324829@mainParenContext frame slot copy on x86_641 parent 14c21a0 commit 1984003
3 files changed
Lines changed: 92 additions & 14 deletions
File tree
- JSTests
- microbenchmarks
- stress
- Source/JavaScriptCore/yarr
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| 781 | + | |
781 | 782 | | |
782 | 783 | | |
783 | | - | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
788 | 792 | | |
789 | 793 | | |
790 | 794 | | |
| |||
806 | 810 | | |
807 | 811 | | |
808 | 812 | | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
814 | 817 | | |
815 | 818 | | |
816 | 819 | | |
817 | 820 | | |
818 | 821 | | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
819 | 827 | | |
820 | 828 | | |
821 | 829 | | |
| |||
826 | 834 | | |
827 | 835 | | |
828 | 836 | | |
| 837 | + | |
829 | 838 | | |
830 | 839 | | |
831 | 840 | | |
| |||
861 | 870 | | |
862 | 871 | | |
863 | 872 | | |
864 | | - | |
| 873 | + | |
| 874 | + | |
865 | 875 | | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
872 | 879 | | |
| 880 | + | |
| 881 | + | |
873 | 882 | | |
874 | 883 | | |
875 | 884 | | |
876 | | - | |
| 885 | + | |
877 | 886 | | |
878 | 887 | | |
879 | 888 | | |
| |||
0 commit comments