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

Small performance optimization to string handling #1358

Merged
merged 1 commit into from Nov 12, 2022

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Nov 12, 2022

  • no need to call PutValue when target is not an object and value was mutated in-place
  • fast path for FromCharCode
  • improve ProbablyBlockStatement

Jint.Benchmark.DromaeoBenchmark

Diff Method FileName Mean Error Allocated
Old Run dromaeo-3d-cube 25.803 ms 0.0178 ms 6247.69 KB
New 25.639 ms (-1%) 0.0151 ms 6248.21 KB (0%)
Old Run dromaeo-core-eval 6.258 ms 0.0199 ms 321.58 KB
New 5.597 ms (-11%) 0.0244 ms 321.84 KB (0%)
Old Run dromaeo-object-array 72.128 ms 0.1724 ms 101492.07 KB
New 69.330 ms (-4%) 0.2562 ms 101492.03 KB (0%)
Old Run droma(...)egexp [21] 231.533 ms 1.5412 ms 172628.85 KB
New 222.238 ms (-4%) 1.9947 ms 174399.84 KB (+1%)
Old Run droma(...)tring [21] 431.184 ms 37.0669 ms 1325371.05 KB
New 436.327 ms (+1%) 36.2579 ms 1322129.7 KB (0%)
Old Run droma(...)ase64 [21] 71.958 ms 0.1181 ms 7658.61 KB
New 70.192 ms (-2%) 0.3129 ms 6537.35 KB (-15%)

* no need to call PutValue when target is not an object and value was mutated in-place
* fast path for FromCharCode
* improve ProbablyBlockStatement
@lahma lahma enabled auto-merge (squash) November 12, 2022 18:31
@lahma lahma merged commit 402a431 into sebastienros:main Nov 12, 2022
@lahma lahma deleted the string-optimizations branch November 12, 2022 18:42
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