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

Convert Jint.Benchmark to use BenchmarkDotNet #445

Merged
merged 1 commit into from
Dec 13, 2017

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Dec 13, 2017

While discussing a performance problem when using RavenDB I also checked some Jint code. There might be possibilities for performance optimizations but there should be solid numbers if changes are made. So I converted the current benchmark project to use BenchmarkDotNet.

Now we can get better numbers and memory allocations from running the Jurassic vs Jint performance test in GitHub pasteable format by running dotnet run -c Release in benchmark project directory:

BenchmarkDotNet=v0.10.11, OS=Windows 10 Redstone 3 [1709, Fall Creators Update] (10.0.16299.98)
Processor=Intel Core i7-6820HQ CPU 2.70GHz (Skylake), ProcessorCount=8
Frequency=2648437 Hz, Resolution=377.5812 ns, Timer=TSC
.NET Core SDK=2.1.2
  [Host]     : .NET Core 2.0.3 (Framework 4.6.25815.02), 64bit RyuJIT
  DefaultJob : .NET Core 2.0.3 (Framework 4.6.25815.02), 64bit RyuJIT

Method Iterations ReuseEngine Mean Error StdDev Gen 0 Gen 1 Allocated
Jint 10 False 1,766.2 us 8.986 us 7.504 us 453.1250 5.8594 1858.52 KB
Jurassic 10 False 51,225.1 us 647.867 us 574.317 us 1062.5000 375.0000 6057 KB
Jint 10 True 960.7 us 14.484 us 13.548 us 125.9766 - 519.06 KB
Jurassic 10 True 49,007.5 us 1,217.638 us 2,132.596 us 62.5000 - 450.25 KB
Jint 20 False 3,647.4 us 43.487 us 38.550 us 906.2500 11.7188 3717.03 KB
Jurassic 20 False 103,830.2 us 1,997.076 us 2,927.289 us 2187.5000 750.0000 12113.99 KB
Jint 20 True 1,920.6 us 37.992 us 58.017 us 251.9531 - 1038.13 KB
Jurassic 20 True 109,151.1 us 2,157.805 us 5,043.800 us 187.5000 62.5000 900.53 KB

@sebastienros sebastienros merged commit 056fea2 into sebastienros:dev Dec 13, 2017
@lahma lahma deleted the benchmarkdotnet branch December 13, 2017 09:04
@sebastienros
Copy link
Owner

Next step is to have benchmarks that spread different parts of the codebase. Like the parser, Arrays, ...or even Sunspider scripts.

@lahma
Copy link
Collaborator Author

lahma commented Dec 13, 2017

I could gladly try to create at least benchmark case for running script against large nested object structure, it showed some places to improve where caching was not present.

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