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

Cleanup custom dictionary implementations #2036

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Jan 24, 2025

Simplifying and adding idiomatic GetValueRefOrNullRef and GetValueRefOrAddDefault. This paves ground for further things.

@lahma
Copy link
Collaborator Author

lahma commented Jan 24, 2025

No obvious regressions, maybe minor improvements due to better ref handling for structs.

Jint.Benchmark.DromaeoBenchmark

Diff Method FileName Mean Error Allocated
Old Run dromaeo-3d-cube 16.193 ms 0.1910 ms 6303.54 KB
New 15.464 ms (-5%) 0.2101 ms 6303.53 KB (0%)
Old Run dromaeo-core-eval 3.193 ms 0.0396 ms 327.5 KB
New 3.053 ms (-4%) 0.0326 ms 327.5 KB (0%)
Old Run dromaeo-object-array 32.472 ms 0.4626 ms 96259.28 KB
New 32.765 ms (+1%) 0.2252 ms 96259.28 KB (0%)
Old Run droma(...)egexp [21] 125.202 ms 2.4769 ms 152142.39 KB
New 127.352 ms (+2%) 2.5013 ms 150088.89 KB (-1%)
Old Run droma(...)tring [21] 239.647 ms 6.7246 ms 1315932.8 KB
New 238.093 ms (-1%) 5.0486 ms 1315960.57 KB (0%)
Old Run droma(...)ase64 [21] 35.450 ms 0.4659 ms 2367.54 KB
New 35.467 ms (0%) 0.6157 ms 2367.54 KB (0%)
Old Run dromaeo-3d-cube 15.285 ms 0.1544 ms 5965.27 KB
New 15.007 ms (-2%) 0.0945 ms 5965.28 KB (0%)
Old Run dromaeo-core-eval 3.066 ms 0.0293 ms 312.43 KB
New 3.081 ms (0%) 0.0336 ms 312.43 KB (0%)
Old Run dromaeo-object-array 32.312 ms 0.3624 ms 96211.88 KB
New 32.930 ms (+2%) 0.4832 ms 96211.88 KB (0%)
Old Run droma(...)egexp [21] 93.031 ms 1.8569 ms 151918.6 KB
New 94.901 ms (+2%) 1.8855 ms 149797.5 KB (-1%)
Old Run droma(...)tring [21] 252.667 ms 9.4087 ms 1315776.21 KB
New 243.684 ms (-4%) 8.7360 ms 1315651.8 KB (0%)
Old Run droma(...)ase64 [21] 35.431 ms 0.5152 ms 2268.38 KB
New 35.802 ms (+1%) 0.4183 ms 2268.36 KB (0%)

Jint.Benchmark.SunSpiderBenchmark

Diff Method FileName Mean Error Allocated
Old Run 3d-cube 123.76 ms 1.827 ms 45164.84 KB
New 120.55 ms (-3%) 1.560 ms 45164.84 KB (0%)
Old Run 3d-morph 106.48 ms 1.337 ms 46258.14 KB
New 111.77 ms (+5%) 0.950 ms 46258.14 KB (0%)
Old Run 3d-raytrace 117.68 ms 1.217 ms 86418.77 KB
New 116.88 ms (-1%) 2.309 ms 86418.77 KB (0%)
Old Run access-binary-trees 64.11 ms 1.254 ms 62249.22 KB
New 65.64 ms (+2%) 0.804 ms 62249.23 KB (0%)
Old Run access-fannkuch 285.92 ms 1.789 ms 103.84 KB
New 273.34 ms (-4%) 3.899 ms 103.84 KB (0%)
Old Run access-nbody 128.22 ms 1.497 ms 53295.23 KB
New 127.70 ms (0%) 1.141 ms 53295.32 KB (0%)
Old Run access-nsieve 94.19 ms 1.349 ms 17142.67 KB
New 93.40 ms (-1%) 0.846 ms 17142.67 KB (0%)
Old Run bitop(...)-byte [24] 100.98 ms 0.456 ms 61948.39 KB
New 99.49 ms (-1%) 1.142 ms 61948.44 KB (0%)
Old Run bitops-bits-in-byte 146.21 ms 1.037 ms 40544.67 KB
New 149.18 ms (+2%) 1.235 ms 40544.67 KB (0%)
Old Run bitops-bitwise-and 84.43 ms 0.515 ms 55938.96 KB
New 85.03 ms (+1%) 0.967 ms 55939.01 KB (0%)
Old Run bitops-nsieve-bits 139.24 ms 2.048 ms 53916.36 KB
New 137.31 ms (-1%) 1.341 ms 53916.36 KB (0%)
Old Run contr(...)rsive [21] 78.36 ms 1.238 ms 92772.97 KB
New 78.10 ms (0%) 1.530 ms 92772.97 KB (0%)
Old Run crypto-aes 85.42 ms 1.232 ms 10750.3 KB
New 82.77 ms (-3%) 0.746 ms 10748.13 KB (0%)
Old Run crypto-md5 73.42 ms 1.074 ms 82176.44 KB
New 69.22 ms (-6%) 0.960 ms 82176.43 KB (0%)
Old Run crypto-sha1 69.44 ms 0.890 ms 68861.22 KB
New 67.08 ms (-3%) 0.732 ms 68861.22 KB (0%)
Old Run date-format-tofte 67.65 ms 0.821 ms 54569.06 KB
New 65.02 ms (-4%) 0.683 ms 54569.06 KB (0%)
Old Run date-format-xparb 37.85 ms 0.742 ms 26400.13 KB
New 38.89 ms (+3%) 0.627 ms 26400.13 KB (0%)
Old Run math-cordic 214.60 ms 2.112 ms 86859.77 KB
New 217.93 ms (+2%) 2.920 ms 86859.77 KB (0%)
Old Run math-partial-sums 76.10 ms 0.484 ms 49367.9 KB
New 75.45 ms (-1%) 0.822 ms 49367.9 KB (0%)
Old Run math-spectral-norm 82.50 ms 1.559 ms 56617.52 KB
New 81.70 ms (-1%) 1.615 ms 56617.52 KB (0%)
Old Run regexp-dna 100.24 ms 1.070 ms 16828.1 KB
New 100.94 ms (+1%) 1.371 ms 16825.89 KB (0%)
Old Run string-base64 52.22 ms 0.492 ms 3156.24 KB
New 52.98 ms (+1%) 0.630 ms 3156.24 KB (0%)
Old Run string-fasta 112.80 ms 1.016 ms 104785.78 KB
New 114.32 ms (+1%) 2.155 ms 104786.09 KB (0%)
Old Run string-tagcloud 53.93 ms 1.074 ms 42042.91 KB
New 53.18 ms (-1%) 1.054 ms 42042.57 KB (0%)
Old Run string-unpack-code 52.23 ms 0.904 ms 73810.7 KB
New 52.58 ms (+1%) 1.012 ms 73810.71 KB (0%)
Old Run strin(...)input [21] 43.06 ms 0.485 ms 20687.73 KB
New 43.83 ms (+2%) 0.417 ms 20687.73 KB (0%)

@sebastienros
Copy link
Owner

Simplifying -> AddDangerous ... But I trust you

@lahma
Copy link
Collaborator Author

lahma commented Jan 24, 2025

Simplifying -> AddDangerous ... But I trust you

Hah, it just for occasions when you know that thing is going to be added and no need to update/check existing value.

@lahma lahma merged commit c87361e into sebastienros:main Jan 24, 2025
3 checks passed
@lahma lahma deleted the data-structure-cleanup branch January 24, 2025 17:17
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