1 comments

  • jay403894 5 hours ago

    A custom, lock-free C++17 fiber scheduler with topological DAG logic gates and rigid 64 byte task layouts optimized for L1 cache boundaries. Solves starvation/deadlock via age-based promotion and priority inheritance.

    currently working on a windows/directx ecosystem of game libs and this is the core of the engine

    its running my platformer and a parallel commandlist renderer shown here https://streamable.com/qakm4h

    my other repos have stuff in them like the renderer, and other libs and some games (although the platformer demo wont run because i need to re upload it with the assets in the distribution and i dont have time before work today)

    either way this is a really cool scheduler i built with a lot of features and options, a fast path if you dont need fiber features, fork join support, topology-aware stealing, built in parallelfor, a built in task-dag, and much more, very fast!

    currently windows-only but highly feature rich and efficient

    Last benchmarks:

    Throughput: 0.82M tasks/sec — this is actually measuring the producer side, not the pool: one thread (main) creating+pushing 200k tasks serially at ~1.2µs each while workers drain faster than main can feed them. So it's your task-creation cost, which is the number the 64-byte change helps. Latency: 6.9µs push→run→wait round trip. That's the floor for "schedule one thing and wait for it" — solid, and it bounds how fine-grained a task can be before overhead eats it: anything under ~10µs of real work isn't worth its own task. ParallelFor: 3.4x speedup — don't read this as "scheduler only scales 3.4x on 32 threads." The kernel is one multiply-add per float over 64MB, which is memory-bandwidth-bound; 3.4x means you saturated DRAM with ~4 cores and the other 28 had nothing to feed on. A compute-heavy kernel (e.g. sqrtf chains) would show the real scaling ceiling. Frame DAG: 31.9µs per 6-node graph — Building, submitting, running, and tearing down a Game01-shaped frame graph costs ~32µs, i.e. 0.2% of a 60fps frame budget.

    fork-join : completed run 0: 12.99 ms (pushed=254, executed=128) fork-join : 1M recursive (10k-elem leaf) best-of-1 -> 12.99 ms

    very fast