1
0
Fork
You've already forked libredo
0
a graph coloring algorithm
  • Zig 96.6%
  • Stata 2.3%
  • C 0.7%
  • Shell 0.4%
2025年11月13日 21:19:38 +00:00
research/redo Merge branch 'new-algo' 2023年09月28日 10:04:53 +00:00
src Use u16 as id in bench 2023年10月07日 06:42:12 +00:00
.gitignore Add readme 2025年11月13日 21:19:38 +00:00
build.zig cleanup 2023年09月28日 11:08:48 +00:00
COPYING.md Add AGPL 2023年11月06日 18:30:36 +00:00
readme.md Add readme 2025年11月13日 21:19:38 +00:00

redo in Zig

This is an "flood fill" graph coloring algorithm. Use any other graph coloring algorithm instead when needed.

Reactive signal/Dependency tracking library in Zig. Data management not included. Possible application: writing UI or build system logic.

Dependency graph data structure inspired by redo. Dependency tracker algorithom inspired by trkl. Benchmark code adapted from maverick-js/signals.

Documentation

Read src/main.zig.

Use as library

This is a Zig-only library. The module name is called signals. This git repo has no submodule, so the tarball can be used in .zon directly.

If you don't know how to use a Zig library, use the search engine to look it up.

Todo

  • add test suite more more tests
  • add solid.js-like interface

optimization ideas

The current BijectMap is fast enough already.

  • cache lookup, so BijectMap.add can be used later faster
  • use u16 instead of u64 as id: ~4x faster
  • coz: tested. not useful.
  • ReleaseFast: same speed as ReleaseSafe.
  • hashmap of hashset: see branch algo-hashmap. too slow
  • splay tree: see branch algo-splaytree. way too slow