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

Cache more script-global information when preparing AST #1671

Merged
merged 4 commits into from
Nov 4, 2023

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Nov 4, 2023


BenchmarkDotNet v0.13.10, Windows 11 (10.0.23580.1000)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.100-rc.2.23502.2
  [Host]     : .NET 6.0.24 (6.0.2423.51814), X64 RyuJIT AVX2
  DefaultJob : .NET 6.0.24 (6.0.2423.51814), X64 RyuJIT AVX2


Method FileName Mean StdDev Median Rank Allocated
NilJS array-stress 7,637.960 μs 17.7584 μs 7,631.125 μs 1 4533.76 KB
Jint array-stress 10,473.637 μs 46.2027 μs 10,456.784 μs 2 7112.02 KB
Jint_ParsedScript array-stress 11,199.507 μs 33.3318 μs 11,189.941 μs 3 7090.84 KB
Jurassic array-stress 13,720.983 μs 32.1991 μs 13,730.230 μs 4 11646.95 KB
YantraJS array-stress 93,781.935 μs 11,913.9805 μs 91,201.800 μs 5 255627.39 KB
YantraJS dromaeo-3d-cube NA NA NA ? NA
NilJS dromaeo-3d-cube 11,493.397 μs 52.7268 μs 11,500.727 μs 1 4694.63 KB
Jint_ParsedScript dromaeo-3d-cube 25,284.574 μs 32.9580 μs 25,278.787 μs 2 5934.53 KB
Jint dromaeo-3d-cube 26,447.232 μs 54.9268 μs 26,452.903 μs 3 6191.84 KB
Jurassic dromaeo-3d-cube 49,177.335 μs 160.6059 μs 49,173.027 μs 4 10670.07 KB
NilJS dromaeo-core-eval 2,654.096 μs 7.5649 μs 2,657.289 μs 1 1598.78 KB
Jint dromaeo-core-eval 5,515.569 μs 21.2601 μs 5,523.020 μs 2 350.87 KB
Jint_ParsedScript dromaeo-core-eval 5,578.374 μs 19.0826 μs 5,571.432 μs 2 333.82 KB
Jurassic dromaeo-core-eval 12,122.506 μs 20.0273 μs 12,124.275 μs 3 2884.86 KB
YantraJS dromaeo-core-eval 14,803.999 μs 30.7505 μs 14,813.175 μs 4 37062.1 KB
Jurassic dromaeo-object-array 50,409.324 μs 43.4887 μs 50,423.100 μs 1 25814.58 KB
Jint dromaeo-object-array 62,551.195 μs 150.6929 μs 62,517.744 μs 2 100794.71 KB
Jint_ParsedScript dromaeo-object-array 65,171.757 μs 237.0869 μs 65,251.363 μs 3 100753.87 KB
NilJS dromaeo-object-array 75,647.396 μs 128.2740 μs 75,649.986 μs 4 17698.17 KB
YantraJS dromaeo-object-array 1,375,596.336 μs 33,347.1365 μs 1,382,990.800 μs 5 4011703.64 KB
YantraJS droma(...)egexp [21] NA NA NA ? NA
Jint_ParsedScript droma(...)egexp [21] 283,013.293 μs 4,437.0537 μs 282,166.950 μs 1 172757.07 KB
Jint droma(...)egexp [21] 296,946.656 μs 6,024.9408 μs 297,986.850 μs 2 167727.6 KB
NilJS droma(...)egexp [21] 604,332.887 μs 1,851.2502 μs 604,514.900 μs 3 767152.42 KB
Jurassic droma(...)egexp [21] 795,342.589 μs 16,081.4325 μs 795,163.600 μs 4 824640.97 KB
NilJS droma(...)tring [21] 433,815.321 μs 11,213.8096 μs 431,664.150 μs 1 1378031.28 KB
Jint_ParsedScript droma(...)tring [21] 587,848.143 μs 59,668.8378 μs 568,762.450 μs 2 1322252.44 KB
Jint droma(...)tring [21] 608,835.312 μs 75,547.9988 μs 583,291.750 μs 2 1322161.33 KB
Jurassic droma(...)tring [21] 625,478.993 μs 9,183.2759 μs 627,874.100 μs 2 1457956.34 KB
YantraJS droma(...)tring [21] 15,372,465.992 μs 66,046.1024 μs 15,375,736.050 μs 3 49975320.46 KB
NilJS droma(...)ase64 [21] 47,866.505 μs 68.1706 μs 47,891.132 μs 1 19604.72 KB
Jint_ParsedScript droma(...)ase64 [21] 61,600.941 μs 102.5388 μs 61,589.878 μs 2 6721.74 KB
Jint droma(...)ase64 [21] 62,911.611 μs 110.9109 μs 62,932.931 μs 3 6807.39 KB
Jurassic droma(...)ase64 [21] 85,168.963 μs 157.5511 μs 85,191.300 μs 4 74323.21 KB
YantraJS droma(...)ase64 [21] 157,057.096 μs 4,981.6652 μs 157,836.475 μs 5 804980.98 KB
Jint_ParsedScript evaluation 13.361 μs 0.0381 μs 13.356 μs 1 27.48 KB
Jint evaluation 33.375 μs 0.0249 μs 33.374 μs 2 36.05 KB
NilJS evaluation 54.673 μs 0.1153 μs 54.648 μs 3 23.47 KB
YantraJS evaluation 158.435 μs 1.2036 μs 157.638 μs 4 962.76 KB
Jurassic evaluation 1,577.859 μs 2.1583 μs 1,576.936 μs 5 420.41 KB
YantraJS linq-js NA NA NA ? NA
Jint_ParsedScript linq-js 120.880 μs 0.2014 μs 120.880 μs 1 226.52 KB
Jint linq-js 2,148.593 μs 2.8369 μs 2,149.433 μs 2 1276.1 KB
NilJS linq-js 10,314.519 μs 45.0646 μs 10,313.370 μs 3 4127.79 KB
Jurassic linq-js 44,604.058 μs 187.5921 μs 44,639.479 μs 4 9302.34 KB
Jint_ParsedScript minimal 3.436 μs 0.0099 μs 3.436 μs 1 12.99 KB
Jint minimal 5.324 μs 0.0190 μs 5.318 μs 2 14.38 KB
NilJS minimal 5.876 μs 0.0177 μs 5.877 μs 3 4.81 KB
YantraJS minimal 152.432 μs 0.5037 μs 152.615 μs 4 957.33 KB
Jurassic minimal 293.000 μs 0.8784 μs 292.940 μs 5 386.24 KB
YantraJS stopwatch 114,031.780 μs 285.4323 μs 113,934.920 μs 1 224314.32 KB
Jurassic stopwatch 253,372.593 μs 1,419.3023 μs 253,067.050 μs 2 156937.47 KB
NilJS stopwatch 287,300.204 μs 807.8973 μs 287,302.800 μs 3 97361.41 KB
Jint_ParsedScript stopwatch 411,543.627 μs 737.7153 μs 411,750.600 μs 4 53015.98 KB
Jint stopwatch 432,505.515 μs 550.0670 μs 432,633.800 μs 5 53045.23 KB

Benchmarks with issues:
EngineComparisonBenchmark.YantraJS: DefaultJob [FileName=dromaeo-3d-cube]
EngineComparisonBenchmark.YantraJS: DefaultJob [FileName=droma(...)egexp [21]]
EngineComparisonBenchmark.YantraJS: DefaultJob [FileName=linq-js]

@lahma lahma merged commit 7a2132f into sebastienros:main Nov 4, 2023
3 checks passed
@lahma lahma deleted the prepare-globals-in-cache branch November 4, 2023 17:08
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.

1 participant