⚡ Bolt: [Zero-Allocation ExecutionNode State Comparison] - #120
Conversation
…mparison In `phase_composite_reevaluation`, multiple `Vec` allocations were used to snapshot and compare `ExecutionNode` states before, during, and after block execution. This replaces the allocations with a zero-allocation `states_differ` helper that compares slice lengths and uses `.zip().any()` to quickly short-circuit on changes, reducing memory overhead on the execution hot path. Co-authored-by: ovasylenko <3797513+ovasylenko@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…mparison In `phase_composite_reevaluation`, multiple `Vec` allocations were used to snapshot and compare `ExecutionNode` states before, during, and after block execution. This replaces the allocations with a zero-allocation `states_differ` helper that compares slice lengths and uses `.zip().any()` to quickly short-circuit on changes, reducing memory overhead on the execution hot path. Also fixed a clippy warning `clippy::manual_is_variant_and` in `orch8-push/src/fcm.rs`. Co-authored-by: ovasylenko <3797513+ovasylenko@users.noreply.github.com>
💡 What: Replaced
Vec<(ExecutionNodeId, NodeState)>allocations inphase_composite_reevaluationwith a zero-allocationstates_differhelper function.🎯 Why: To reduce unnecessary memory allocations and hashing overhead on the evaluation hot path when comparing execution tree states.
📊 Impact: Eliminates multiple heap allocations per composite node tick, improving throughput and reducing memory pressure during heavy workloads.
🔬 Measurement: Verified via
cargo +nightly test -p orch8-engine --lib evaluator::tests.PR created automatically by Jules for task 979372772646664012 started by @ovasylenko