-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
react: Update only dependents of the just-set cell (#131)
* react: Update only dependents of the just-set cell The initial version of react (see #126) let the reactor store all cells in a linked list, then blindly updated all cells whenever any cell was set. This was correct but wasteful. This commit rearchitects the example solution so that: * reactors only keep track of the input cells * all other cells keep track of their dependent compute cells * only dependents get updated when a cell is set Space cost of: * one extra `struct child` allocated per compute2 cell created. * one extra integer field per cell. * react: Add NULL checks on all allocations
- Loading branch information
1 parent
6b67dc5
commit a583448
Showing
1 changed file
with
106 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters