a graph coloring algorithm
- Zig 96.6%
- Stata 2.3%
- C 0.7%
- Shell 0.4%
|
|
||
|---|---|---|
| research/redo | Merge branch 'new-algo' | |
| src | Use u16 as id in bench | |
| .gitignore | Add readme | |
| build.zig | cleanup | |
| COPYING.md | Add AGPL | |
| readme.md | Add readme | |
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.addcan 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