Commit graph

12 commits

Author SHA1 Message Date
Developer
e91308720b feat: identity hashing for ActorAddress hot-path optimization (Cycle 20)
Replace SipHash with identity hasher on all hot-path HashMaps keyed by
ActorAddress. Since addresses are crypto-random, the first 8 bytes serve
as an excellent hash directly. Microbenchmarks show 1.9-4.6x lookup
speedup depending on map size.

- Custom Hash impl for ActorAddress (8-byte write_u64 instead of 32)
- AddrHasher/AddrBuildHasher identity hasher in delivery.rs
- AddrMap<V>/AddrSet type aliases used in 7 HashMap sites
- Stop-requests is_empty() short-circuit in tick_all inner loop
- 3 new behavioral tests, component microbenchmarks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:01:30 +00:00
Developer
0ef6df9a56 bench: add registry benchmarks for named actors, groups, monitors, ask (Cycle 16)
New benchmark group measuring named spawn/lookup (~2.4µs), group publish
(linear O(N)), monitor setup, and ask roundtrip (~4.5µs). All registry
operations efficient with minimal overhead vs baseline operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 13:36:22 +00:00
Developer
7d00e65a0a feat: load-aware actor placement + work stealing research
Replace blind round-robin placement with load-aware strategy that reads
per-worker stats (actor count + mailbox depth) and biases toward lighter
workers. Falls back to round-robin when stats are equal (initial burst).

Deep research on work stealing across Tokio (steal-half, LIFO slot),
Go (M:N scheduler), BEAM (proactive migration), and ForkJoinPool.
Full actor migration is feasible but deferred due to message-loss window.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:46:53 +00:00
Developer
10cb0780b7 feat: stress tests, expanded benchmarks, and research extension
Cycle 2 of the competitor analysis improvement loop.

Research additions:
- Kameo: async on tokio, dual bounded/unbounded mailbox (default 64),
  Erlang-style supervision links, vtable dispatch
- Actix: custom Vyukov lock-free MPSC queue (why it's fastest),
  256-message assertion guard (validates our budget), Context-as-Future

New stress tests (6):
- Message ordering preserved under small budget (budget=8)
- Multi-threaded: 50 senders × 100 msgs to one receiver (4 threads)
- Concurrent spawn+send of 200 actors (4 threads)
- 50-level chain spawning across 2 workers
- Panic isolation: 10 panicking + 10 healthy actors (4 threads)
- Sustained throughput: 10 batches of 100 msgs with interleaved ticks

New benchmark groups:
- msg_size: throughput and send_latency by message size (8B-4KB)
- contention: fanin (1-100 senders), cross_worker (1-4 threads)

All 57 tests pass (51 runtime_api + 5 transport + 1 doctest).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:24:33 +00:00
Developer
ef87f7e1b9 feat: per-actor message budget for tick fairness
Research across ractor, tokio, Erlang/OTP BEAM, Linux CFS, and libuv
revealed that tick_all drained the entire mailbox per actor per tick,
allowing one hot actor to starve all others on the same worker.

- Add `actor_message_budget` to RuntimeConfig (default: 64 msgs/actor/tick)
- Modify tick_all to break after budget messages, yielding to next actor
- budget=0 restores unlimited (backward compatible) behavior
- 3 new fairness tests validating hot-cold actor scenarios
- New fairness benchmark group (cold_latency_under_pressure, throughput_by_budget)
- Fix RuntimeConfig struct literals across workspace crates

Inspired by BEAM's 4000-reduction budget and tokio's 128-op cooperative budget.
All 45 tests pass (42 original + 3 new).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:11:30 +00:00
2da9198ee9 fix: stats datatypes and refactor channel signature (#28) 2026-02-10 07:35:58 +00:00
845132ff18 feat: mt benchmark (#25) 2026-02-09 14:02:40 +00:00
09504d0b67 cfuzz (#22) 2026-02-09 07:24:16 +00:00
08a655d88a refactor: graph-optimization (#17)
Use spectral analysis tool to find spurious edges in the code DAG, refactoring to prune.
2026-02-07 16:51:40 +00:00
Zachery Aaron Shores-Chmielewski
d3fdf9e550 feat: worker thread api (#6)
Make the worker thread api clearly seperated and ready for test harness
2026-02-06 21:45:19 +07:00
5a9af73de6 refactor: major library changes (#5)
Refactoring to logically separate component modules in order to make it easier to develop tests, metrics, tracing, etc.
2026-02-06 11:25:37 +00:00
Zachery Aaron Shores-Chmielewski
c56a05433f feat: Stress tests, benchmarking, and non-failing queues and inboxes #3
Adds some basic benchmarking, stress tests. They still need to be properly examined to ensure they are testing the correct properties, but fit for "good enough". Implements the HybridChannel type, which features a channel buffer that can withstand overflows. It does so by providing a dequeue behind a mutex. Without overflow, will push messages into the lock free ArrayQueue implemented by crossbeam_queue; when that buffer fills, will use the locking portion provided by the Mutex<VecDequeue>.

In the future we can even further optimize this, perhaps with some linked list implementations of lock-free channels, but, like the benchmarks, this fits the "good enough" bar for now.
2026-01-26 14:14:00 +07:00