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

Optimize EvaluateMemberExpression when targeting static member #453

Merged

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Dec 22, 2017

Member expression invocation is on hot path with static object properties and allocates a lot of literals, we can simplify it to work without literal expression evaluation.

UncacheableExpressionsBenchmark

Before (dev branch)

Method N Mean Error StdDev Gen 0 Gen 1 Allocated
Benchmark 500 1.094 s 0.0049 s 0.0071 s 243554.1667 15075.0000 997.15 MB

After (this pull request)

Method N Mean Error StdDev Gen 0 Gen 1 Allocated
Benchmark 500 1.081 s 0.0112 s 0.0167 s 202687.5000 55312.5000 903.2 MB

@sebastienros sebastienros merged commit c2f013d into sebastienros:dev Dec 22, 2017
@lahma lahma mentioned this pull request Dec 29, 2017
@lahma lahma deleted the perf/cache-member-expression-literal branch January 3, 2018 05:43
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

2 participants