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

Add module level SkipLocalsInit #614

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Dec 9, 2023

Let's extract some free perf with the magic attribute. Fluid doesn't expect specific initialization and usages should be safe. Same thing is used in Parlot, Esprima and Jint.

Fluid.Benchmarks.FluidBenchmarks

Diff Method Toolchain Mean Error Allocated
Old Parse Default 4.455 μs 0.0235 μs 2.68 KB
New Default 4.345 μs (-2%) 0.0164 μs 2.68 KB (0%)
Old ParseBig Default 23.970 μs 0.1198 μs 11.61 KB
New Default 23.470 μs (-2%) 0.0663 μs 11.61 KB (0%)
Old Render Default 189.348 μs 0.6141 μs 95.86 KB
New Default 191.471 μs (+1%) 0.7625 μs 95.86 KB (0%)
Old ParseAndRender Default 200.195 μs 0.4416 μs 99.01 KB
New Default 197.654 μs (-1%) 0.5037 μs 99.01 KB (0%)

@sebastienros sebastienros merged commit 5d2ba20 into sebastienros:main Jan 8, 2024
1 check passed
@lahma lahma deleted the skip-locals-init branch January 8, 2024 18:44
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.

2 participants