8000 Remove firewall children and add test by robbiespeed · Pull Request #3 · milomg/r3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove firewall children and add test #3

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

robbiespeed
Copy link
@robbiespeed robbiespeed commented Jun 19, 2025

Firewall children don't seem to be adding benefit and are a perf reduction due to unneeded O(n) propagation across children. The children that need updating do so as part of the firewall computed's update function.

Also fixed a issue with computeds getting stuck in the wrong dirtyHeap location if their height changes during a compute where they get re-added to the heap.

Added Tests:

   ✓ firewall signals height jump (init signal - 0 height start) 0ms
   ✓ firewall signals height jump (init raw - 0 height start) 0ms
   ✓ firewall signals height jump (init internal - normal height start) 0ms
   ✓ firewall signals height swap (init signal - 0 height start) 0ms
   ✓ firewall signals height swap (init raw - 0 height start) 0ms
   ✓ firewall signals height swap (init internal - normal height start) 0ms

Benchmark old:

 ✓ test/bench/cellx.bench.ts 1229ms
     name               hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · cellx        1,410.21  0.6167  2.7699  0.7091  0.6568  1.7853  1.9005  2.7699  ±2.52%      706   fastest
   · cellx-solid    208.87  2.7250  7.9088  4.7876  5.1981  7.7776  7.9088  7.9088  ±4.33%      105

 ✓ test/bench/cellx.bench.ts 1229ms
     name               hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · cellx        1,410.21  0.6167  2.7699  0.7091  0.6568  1.7853  1.9005  2.7699  ±2.52%      706   fastest
   · cellx-solid    208.87  2.7250  7.9088  4.7876  5.1981  7.7776  7.9088  7.9088  ±4.33%      105

 ✓ test/bench/s.bench.ts 1218ms
     name                                hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · updateComputations1to4        1,441.31  0.6080  1.6986  0.6938  0.6558  1.1442  1.1635  1.6986  ±1.51%      721   fastest
   · updateComputations1to4-solid    550.67  1.7641  2.7750  1.8160  1.8239  2.0132  2.7676  2.7750  ±0.57%      276

 ✓ test/bench/s.bench.ts 1218ms
     name                                hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · updateComputations1to4        1,441.31  0.6080  1.6986  0.6938  0.6558  1.1442  1.1635  1.6986  ±1.51%      721   fastest
   · updateComputations1to4-solid    550.67  1.7641  2.7750  1.8160  1.8239  2.0132  2.7676  2.7750  ±0.57%      276

VS this PR:

 ✓ test/bench/cellx.bench.ts 1229ms
     name               hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · cellx        1,453.48  0.6408  1.0360  0.6880  0.6735  0.9568  1.0035  1.0360  ±0.72%      727   fastest
   · cellx-solid    224.13  3.3369  8.9683  4.4616  4.5530  6.3503  8.9683  8.9683  ±3.12%      113

 ✓ test/bench/cellx.bench.ts 1229ms
     name               hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · cellx        1,453.48  0.6408  1.0360  0.6880  0.6735  0.9568  1.0035  1.0360  ±0.72%      727   fastest
   · cellx-solid    224.13  3.3369  8.9683  4.4616  4.5530  6.3503  8.9683  8.9683  ±3.12%      113

 ✓ test/bench/s.bench.ts 1218ms
     name                                hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · updateComputations1to4        1,225.98  0.7223  2.0167  0.8157  0.7670  1.2903  1.2970  2.0167  ±1.64%      613   fastest
   · updateComputations1to4-solid    493.08  1.9491  3.0605  2.0281  2.0279  2.5614  2.8375  3.0605  ±0.57%      247

 ✓ test/bench/s.bench.ts 1218ms
     name                                hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · updateComputations1to4        1,225.98  0.7223  2.0167  0.8157  0.7670  1.2903  1.2970  2.0167  ±1.64%      613   fastest
   · updateComputations1to4-solid    493.08  1.9491  3.0605  2.0281  2.0279  2.5614  2.8375  3.0605  ±0.57%      247

@robbiespeed robbiespeed marked this pull request as draft June 19, 2025 16:02
… compute with height change. Infinity default minDirty to avoid explosive updateIfNecessary on computed initialization.
@robbiespeed
Copy link
Author

Some of those additional tests might be a tad redundant, could remove either init raw or init signal tests.

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
0