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

feat: Skip measuring of cached siblings in layout #317

Conversation

marc2332
Copy link
Owner

Depends on #314

@github-actions
Copy link

Benchmark for 60d2c3e

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 77.3±0.58µs 94.0±0.38µs +21.60%
benchmarks/big trees (deep + cached) + invalidated node in the middle 94.7±0.63µs 110.4±0.36µs +16.58%
benchmarks/big trees (deep + cached) + invalidated node in the top 164.1±1.09µs 173.9±0.96µs +5.97%
benchmarks/big trees (deep) nodes=10000, depth=14 141.2±0.28µs 144.8±0.22µs +2.55%
benchmarks/big trees (deep) nodes=100000, depth=17 1336.8±47.78µs 1375.7±44.83µs +2.91%
benchmarks/big trees (deep) nodes=4000, depth=12 75.8±0.66µs 77.7±0.76µs +2.51%
benchmarks/big trees (wide) nodes=1000, depth=1 177.1±0.31µs 181.2±0.43µs +2.32%
benchmarks/big trees (wide) nodes=10000, depth=1 2.1±0.02ms 2.1±0.06ms 0.00%
benchmarks/big trees (wide) nodes=100000, depth=1 36.8±0.47ms 36.9±0.44ms +0.27%

@github-actions
Copy link

Benchmark for 60d2c3e

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 77.7±0.56µs 94.3±0.59µs +21.36%
benchmarks/big trees (deep + cached) + invalidated node in the middle 93.1±0.37µs 110.5±0.46µs +18.69%
benchmarks/big trees (deep + cached) + invalidated node in the top 162.9±0.56µs 172.8±0.53µs +6.08%
benchmarks/big trees (deep) nodes=10000, depth=14 142.2±0.59µs 145.9±0.47µs +2.60%
benchmarks/big trees (deep) nodes=100000, depth=17 1526.9±213.68µs 1560.4±202.35µs +2.19%
benchmarks/big trees (deep) nodes=4000, depth=12 75.7±0.60µs 77.3±0.64µs +2.11%
benchmarks/big trees (wide) nodes=1000, depth=1 178.3±0.31µs 181.5±0.27µs +1.79%
benchmarks/big trees (wide) nodes=10000, depth=1 2.2±0.36ms 2.7±0.55ms +22.73%
benchmarks/big trees (wide) nodes=100000, depth=1 44.5±2.88ms 44.4±2.73ms -0.22%

@github-actions
Copy link

Benchmark for 6eec396

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 77.0±0.51µs 87.7±0.35µs +13.90%
benchmarks/big trees (deep + cached) + invalidated node in the middle 93.0±0.30µs 103.7±0.35µs +11.51%
benchmarks/big trees (deep + cached) + invalidated node in the top 162.4±0.67µs 182.2±0.49µs +12.19%
benchmarks/big trees (deep) nodes=10000, depth=14 140.6±0.18µs 142.8±0.83µs +1.56%
benchmarks/big trees (deep) nodes=100000, depth=17 1262.9±13.12µs 1276.7±20.31µs +1.09%
benchmarks/big trees (deep) nodes=4000, depth=12 75.7±0.58µs 76.8±0.55µs +1.45%
benchmarks/big trees (wide) nodes=1000, depth=1 176.1±0.25µs 178.4±0.81µs +1.31%
benchmarks/big trees (wide) nodes=10000, depth=1 2.0±0.04ms 2.0±0.01ms 0.00%
benchmarks/big trees (wide) nodes=100000, depth=1 33.8±1.06ms 34.5±1.12ms +2.07%

@github-actions
Copy link

Benchmark for 69f3b59

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 77.0±0.48µs 88.6±0.53µs +15.06%
benchmarks/big trees (deep + cached) + invalidated node in the middle 93.3±0.31µs 104.8±0.57µs +12.33%
benchmarks/big trees (deep + cached) + invalidated node in the top 162.9±0.67µs 184.9±1.04µs +13.51%
benchmarks/big trees (deep) nodes=10000, depth=14 138.9±0.19µs 139.7±0.20µs +0.58%
benchmarks/big trees (deep) nodes=100000, depth=17 1258.0±16.12µs 1258.4±15.92µs +0.03%
benchmarks/big trees (deep) nodes=4000, depth=12 74.5±0.59µs 74.7±0.62µs +0.27%
benchmarks/big trees (wide) nodes=1000, depth=1 173.5±0.21µs 173.8±0.26µs +0.17%
benchmarks/big trees (wide) nodes=10000, depth=1 1972.7±11.80µs 1977.7±5.96µs +0.25%
benchmarks/big trees (wide) nodes=100000, depth=1 34.1±0.61ms 34.3±0.58ms +0.59%

@github-actions
Copy link

Benchmark for 2afda96

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 77.6±1.79µs 88.4±0.53µs +13.92%
benchmarks/big trees (deep + cached) + invalidated node in the middle 93.2±0.59µs 104.3±0.68µs +11.91%
benchmarks/big trees (deep + cached) + invalidated node in the top 163.6±0.64µs 184.5±1.06µs +12.78%
benchmarks/big trees (deep) nodes=10000, depth=14 151.2±0.76µs 139.9±0.47µs -7.47%
benchmarks/big trees (deep) nodes=100000, depth=17 1714.6±254.79µs 1450.9±120.41µs -15.38%
benchmarks/big trees (deep) nodes=4000, depth=12 79.8±1.06µs 74.9±0.87µs -6.14%
benchmarks/big trees (wide) nodes=1000, depth=1 190.9±5.90µs 174.0±0.21µs -8.85%
benchmarks/big trees (wide) nodes=10000, depth=1 2.5±0.26ms 2.0±0.05ms -20.00%
benchmarks/big trees (wide) nodes=100000, depth=1 45.2±3.54ms 40.4±3.10ms -10.62%

@github-actions
Copy link

Benchmark for 9cc1f6b

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 77.1±0.55µs 88.6±0.74µs +14.92%
benchmarks/big trees (deep + cached) + invalidated node in the middle 93.2±0.26µs 104.6±0.28µs +12.23%
benchmarks/big trees (deep + cached) + invalidated node in the top 162.9±0.58µs 184.3±1.04µs +13.14%
benchmarks/big trees (deep) nodes=10000, depth=14 141.0±0.20µs 141.5±0.99µs +0.35%
benchmarks/big trees (deep) nodes=100000, depth=17 1282.1±14.80µs 1308.9±15.39µs +2.09%
benchmarks/big trees (deep) nodes=4000, depth=12 74.1±0.50µs 75.1±0.65µs +1.35%
benchmarks/big trees (wide) nodes=1000, depth=1 177.8±1.92µs 175.3±0.20µs -1.41%
benchmarks/big trees (wide) nodes=10000, depth=1 2.1±0.11ms 1973.3±8.03µs -6.03%
benchmarks/big trees (wide) nodes=100000, depth=1 29.9±0.59ms 35.1±0.57ms +17.39%

@github-actions
Copy link

Benchmark for a253adc

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 93.9±0.21µs 117.8±0.26µs +25.45%
benchmarks/big trees (deep + cached) + invalidated node in the middle 112.0±0.21µs 135.7±0.25µs +21.16%
benchmarks/big trees (deep + cached) + invalidated node in the top 197.2±0.37µs 236.6±0.44µs +19.98%
benchmarks/big trees (deep) nodes=10000, depth=14 152.9±0.35µs 156.0±0.50µs +2.03%
benchmarks/big trees (deep) nodes=100000, depth=17 1441.7±32.14µs 1451.5±34.26µs +0.68%
benchmarks/big trees (deep) nodes=4000, depth=12 81.9±0.37µs 82.7±0.57µs +0.98%
benchmarks/big trees (wide) nodes=1000, depth=1 190.0±0.59µs 190.0±3.71µs 0.00%
benchmarks/big trees (wide) nodes=10000, depth=1 2.3±0.08ms 2.2±0.04ms -4.35%
benchmarks/big trees (wide) nodes=100000, depth=1 40.4±1.11ms 39.2±0.66ms -2.97%

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (6b2509f) 52.68% compared to head (7081a0e) 52.70%.

Additional details and impacted files
@@                             Coverage Diff                              @@
##           feat/improved-measuring-of-cached-layout     #317      +/-   ##
============================================================================
+ Coverage                                     52.68%   52.70%   +0.01%     
============================================================================
  Files                                           129      129              
  Lines                                         11234    11281      +47     
============================================================================
+ Hits                                           5919     5946      +27     
- Misses                                         5315     5335      +20     
Files Coverage Δ
crates/torin/src/dom_adapter.rs 100.00% <ø> (ø)
crates/torin/src/torin.rs 90.07% <100.00%> (+0.38%) ⬆️
crates/torin/tests/test.rs 99.80% <100.00%> (+<0.01%) ⬆️
crates/dom/src/dom_adapter.rs 47.53% <0.00%> (-6.70%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

Benchmark for cbc6435

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 79.6±0.30µs 83.7±0.15µs +5.15%
benchmarks/big trees (deep + cached) + invalidated node in the middle 94.4±0.19µs 99.3±0.18µs +5.19%
benchmarks/big trees (deep + cached) + invalidated node in the top 167.0±0.40µs 180.0±0.61µs +7.78%
benchmarks/big trees (deep) nodes=10000, depth=14 128.1±0.26µs 140.7±0.23µs +9.84%
benchmarks/big trees (deep) nodes=100000, depth=17 1263.6±28.57µs 1387.8±24.34µs +9.83%
benchmarks/big trees (deep) nodes=4000, depth=12 69.0±0.96µs 74.9±0.81µs +8.55%
benchmarks/big trees (wide) nodes=1000, depth=1 157.9±0.48µs 176.8±3.23µs +11.97%
benchmarks/big trees (wide) nodes=10000, depth=1 1908.1±44.35µs 2.1±0.04ms +10.06%
benchmarks/big trees (wide) nodes=100000, depth=1 37.4±0.75ms 39.8±0.58ms +6.42%

@github-actions
Copy link

Benchmark for cbc6435

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + cached) + invalidated node in the bottom 80.2±0.48µs 83.7±0.20µs +4.36%
benchmarks/big trees (deep + cached) + invalidated node in the middle 94.6±0.25µs 98.7±0.36µs +4.33%
benchmarks/big trees (deep + cached) + invalidated node in the top 167.4±1.43µs 178.4±0.29µs +6.57%
benchmarks/big trees (deep) nodes=10000, depth=14 137.2±0.77µs 130.1±0.19µs -5.17%
benchmarks/big trees (deep) nodes=100000, depth=17 1272.7±16.80µs 1251.6±15.35µs -1.66%
benchmarks/big trees (deep) nodes=4000, depth=12 72.5±0.70µs 69.6±0.79µs -4.00%
benchmarks/big trees (wide) nodes=1000, depth=1 170.9±0.38µs 161.6±1.59µs -5.44%
benchmarks/big trees (wide) nodes=10000, depth=1 1981.9±11.45µs 1947.0±20.53µs -1.76%
benchmarks/big trees (wide) nodes=100000, depth=1 34.9±0.42ms 35.2±0.42ms +0.86%

@github-actions
Copy link

Benchmark for 42cc9b4

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + branches + cached) + invalidated node in the middle 1454.8±27.86ns N/A N/A
benchmarks/big trees (deep + cached) + invalidated node in the bottom 81.0±0.61µs 83.7±0.17µs +3.33%
benchmarks/big trees (deep + cached) + invalidated node in the middle 95.6±0.26µs 99.1±0.18µs +3.66%
benchmarks/big trees (deep + cached) + invalidated node in the top 168.4±0.36µs 178.9±0.80µs +6.24%
benchmarks/big trees (deep) nodes=10000, depth=14 129.0±0.71µs 134.7±0.19µs +4.42%
benchmarks/big trees (deep) nodes=100000, depth=17 1210.2±14.65µs 1270.5±14.18µs +4.98%
benchmarks/big trees (deep) nodes=4000, depth=12 69.0±0.87µs 71.5±0.77µs +3.62%
benchmarks/big trees (wide) nodes=1000, depth=1 159.7±1.15µs 167.7±1.62µs +5.01%
benchmarks/big trees (wide) nodes=10000, depth=1 1874.4±11.52µs 1975.7±9.04µs +5.40%
benchmarks/big trees (wide) nodes=100000, depth=1 33.5±0.49ms 35.6±0.53ms +6.27%

@github-actions
Copy link

Benchmark for 13027f0

Click to view benchmark
Test Base PR %
benchmarks/big trees (deep + branches + cached) + invalidated node in the middle 1734.4±21.38ns N/A N/A
benchmarks/big trees (deep + cached) + invalidated node in the bottom 95.5±0.25µs 102.5±0.24µs +7.33%
benchmarks/big trees (deep + cached) + invalidated node in the middle 114.0±0.29µs 120.6±0.22µs +5.79%
benchmarks/big trees (deep + cached) + invalidated node in the top 200.3±1.17µs 220.2±0.95µs +9.94%
benchmarks/big trees (deep) nodes=10000, depth=14 156.5±0.51µs 157.0±0.43µs +0.32%
benchmarks/big trees (deep) nodes=100000, depth=17 1683.9±88.18µs 1590.9±59.02µs -5.52%
benchmarks/big trees (deep) nodes=4000, depth=12 83.1±0.46µs 83.4±0.17µs +0.36%
benchmarks/big trees (wide) nodes=1000, depth=1 194.1±7.00µs 193.9±1.26µs -0.10%
benchmarks/big trees (wide) nodes=10000, depth=1 2.8±0.17ms 2.7±0.17ms -3.57%
benchmarks/big trees (wide) nodes=100000, depth=1 42.0±0.49ms 42.2±0.91ms +0.48%

@marc2332 marc2332 merged commit cc29346 into feat/improved-measuring-of-cached-layout Oct 1, 2023
6 checks passed
@marc2332 marc2332 deleted the feat/skip-measuring-of-cached-siblings-layout branch October 1, 2023 12:48
marc2332 added a commit that referenced this pull request Oct 1, 2023
marc2332 added a commit that referenced this pull request Oct 1, 2023
marc2332 added a commit that referenced this pull request Oct 1, 2023
* feat: Improved measuring of cached layout

* clean up

* fixes

* fix

* clean up

* clean up

* feat: Skip measuring of cached siblings in layout (#317)

* feat: Skip measuring of cached siblings in layout

* clean up

* remove fxhash

* fix test

* fixes

* .

* clean up

* new benchmark

* add_with_depth

* fix

* fix

* fix

* fixes

* fixes

* fixes

* fixes

* Update bench.rs

* Revert "feat: Skip measuring of cached siblings in layout (#317)" (#320)

This reverts commit cc29346.
marc2332 added a commit that referenced this pull request Oct 22, 2023
* feat: Improved measuring of cached layout

* clean up

* fixes

* fix

* feat: New torin benchmark, deep + wide + cached

* Update bench.rs

* tweak

* clean up

* clean up

* feat: Skip measuring of cached siblings in layout (#317)

* feat: Skip measuring of cached siblings in layout

* clean up

* remove fxhash

* fix test

* fixes

* .

* clean up

* new benchmark

* add_with_depth

* fix

* fix

* fix

* fixes

* fixes

* fixes

* fixes

* Update bench.rs

* iter_batched

* workflow_dispatch

* clean up

* remove fxhash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request experiment 🧪 performance ⚡️ Performance improvement ⚡️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant