Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test262 to latest and fix issues #1151

Merged
merged 7 commits into from Apr 29, 2022

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Apr 24, 2022

Adding support for __proto__ as they introduced test cases which depend on it. Not endorsed feature but basically every runtime supports its.

Implemented checks when producing array operations handler that checks if array instance chain is uncontaminated and can successfully use the fast path, otherwise choose slower object property based. There are examples where JS gets injected with something like Object.defineProperty(Object.prototype, "0", some_descriptor_which_has_setter_that_mutates_length), so basically catching those rare occasions and switching to slow mode (full property setters instead of fast array index set inside array).

Some other minor tweaks.

@lahma lahma requested a review from sebastienros April 24, 2022 14:38
@lahma lahma force-pushed the test262harness-update branch 2 times, most recently from 41b550b to 4ef64ee Compare April 27, 2022 17:30
@lahma
Copy link
Collaborator Author

lahma commented Apr 28, 2022

After utilizing new info about how and when can some faster patterns can be used, results:

Esprima.Benchmark.SunSpiderBenchmark

Diff Method FileName Mean Error Gen 0 Gen 1 Gen 2 Allocated
Old Run 3d-cube 256.73 ms 1.156 ms 3000.0000 500.0000 - 52 MB
New 250.19 ms (-3%) 0.401 ms 3000.0000 (0%) 500.0000 (0%) - 51,802 KB (-3%)
Old Run 3d-morph 227.13 ms 1.439 ms 4333.3333 1333.3333 333.3333 66 MB
New 196.19 ms (-14%) 0.636 ms 2000.0000 (-54%) 1000.0000 (-25%) - 49,797 KB (-26%)
Old Run 3d-raytrace 202.73 ms 0.631 ms 5000.0000 1000.0000 - 92 MB
New 200.68 ms (-1%) 0.538 ms 5000.0000 (0%) 1000.0000 (0%) - 94,150 KB (0%)
Old Run access-binary-trees 103.26 ms 0.196 ms 4800.0000 400.0000 - 77 MB
New 102.65 ms (-1%) 0.712 ms 4800.0000 (0%) 400.0000 (0%) - 78,538 KB (0%)
Old Run access-fannkuch 687.57 ms 1.110 ms 2000.0000 - - 38 MB
New 588.80 ms (-14%) 4.182 ms - - - 229 KB (-99%)
Old Run access-nbody 241.22 ms 0.692 ms 3000.0000 - - 63 MB
New 239.21 ms (-1%) 0.910 ms 3000.0000 (0%) - - 64,069 KB (-1%)
Old Run access-nsieve 242.43 ms 1.319 ms 4000.0000 1333.3333 333.3333 61 MB
New 188.16 ms (-22%) 0.920 ms 1000.0000 (-75%) - - 21,569 KB (-65%)
Old Run bitop(...)-byte [24] 210.96 ms 0.566 ms 4000.0000 - - 67 MB
New 205.27 ms (-3%) 0.965 ms 4000.0000 (0%) - - 68,986 KB (+1%)
Old Run bitops-bits-in-byte 307.46 ms 1.718 ms 2500.0000 - - 44 MB
New 311.74 ms (+1%) 0.482 ms 2500.0000 (0%) - - 45,475 KB (+1%)
Old Run bitops-bitwise-and 219.29 ms 3.217 ms 5000.0000 - - 91 MB
New 208.82 ms (-5%) 0.933 ms 5000.0000 (0%) - - 93,452 KB (0%)
Old Run bitops-nsieve-bits 276.71 ms 1.117 ms 4000.0000 1000.0000 - 67 MB
New 247.61 ms (-11%) 1.080 ms 3000.0000 (-25%) 1000.0000 (0%) - 54,912 KB (-20%)
Old Run contr(...)rsive [21] 155.10 ms 2.365 ms 7000.0000 2000.0000 - 121 MB
New 150.50 ms (-3%) 0.504 ms 7000.0000 (0%) 2000.0000 (0%) - 124,168 KB (0%)
Old Run crypto-aes 185.39 ms 0.424 ms 1000.0000 - - 26 MB
New 162.74 ms (-12%) 0.297 ms - - - 16,266 KB (-39%)
Old Run crypto-md5 132.36 ms 0.656 ms 5000.0000 1000.0000 - 95 MB
New 128.50 ms (-3%) 0.482 ms 5000.0000 (0%) 1000.0000 (0%) - 95,991 KB (-1%)
Old Run crypto-sha1 136.46 ms 0.672 ms 5000.0000 1000.0000 - 81 MB
New 134.96 ms (-1%) 0.408 ms 5000.0000 (0%) 250.0000 (-75%) - 82,364 KB (-1%)
Old Run date-format-tofte 125.97 ms 1.218 ms 3000.0000 - - 60 MB
New 128.54 ms (+2%) 0.254 ms 3000.0000 (0%) 1000.0000 - 61,651 KB (0%)
Old Run date-format-xparb 70.24 ms 0.125 ms 1750.0000 750.0000 - 29 MB
New 69.78 ms (-1%) 0.142 ms 1750.0000 (0%) 750.0000 (0%) - 29,846 KB (+1%)
Old Run math-cordic 441.91 ms 2.317 ms 7000.0000 - - 121 MB
New 449.64 ms (+2%) 1.136 ms 7000.0000 (0%) - - 124,045 KB (0%)
Old Run math-partial-sums 159.78 ms 1.432 ms 4000.0000 - - 67 MB
New 158.05 ms (-1%) 0.502 ms 4000.0000 (0%) - - 69,006 KB (+1%)
Old Run math-spectral-norm 164.88 ms 0.530 ms 4000.0000 - - 66 MB
New 163.07 ms (-1%) 0.851 ms 4000.0000 (0%) - - 67,258 KB (0%)
Old Run regexp-dna 110.52 ms 2.144 ms 1000.0000 1000.0000 1000.0000 17 MB
New 106.98 ms (-3%) 0.810 ms 1200.0000 (+20%) 1200.0000 (+20%) 1200.0000 (+20%) 17,724 KB (+2%)
Old Run string-base64 126.88 ms 0.378 ms - - - 12 MB
New 124.86 ms (-2%) 0.435 ms - - - 12,716 KB (+3%)
Old Run string-fasta 239.36 ms 1.064 ms 10333.3333 333.3333 - 165 MB
New 229.66 ms (-4%) 0.322 ms 10000.0000 (-3%) 333.3333 (0%) - 167,373 KB (-1%)
Old Run string-tagcloud 85.12 ms 0.520 ms 3166.6667 1166.6667 500.0000 51 MB
New 85.18 ms (0%) 0.324 ms 3666.6667 (+16%) 1666.6667 (+43%) 666.6667 (+33%) 52,707 KB (+1%)
Old Run string-unpack-code 86.09 ms 0.485 ms 5000.0000 500.0000 - 83 MB
New 83.99 ms (-2%) 0.278 ms 5000.0000 (0%) 500.0000 (0%) - 85,018 KB (0%)
Old Run strin(...)input [21] 101.88 ms 0.409 ms 2000.0000 1000.0000 - 44 MB
New 103.41 ms (+2%) 0.260 ms 2000.0000 (0%) 1000.0000 (0%) - 44,720 KB (-1%)

@lahma lahma merged commit e0328f2 into sebastienros:main Apr 29, 2022
@lahma lahma deleted the test262harness-update branch April 29, 2022 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant