Repository navigation
Conversation
…n compute_range_vs_range_equity Replaced the dynamic instantiation of a set inside the hot loop `forbidden = set(v_hand) | set(sampled_board)` with a pre-allocated O(1) tracking boolean array `forbidden = [False] * 52`. This drastically reduces memory allocation and dictionary overhead inside the innermost Monte Carlo evaluation block, avoiding constant `set` creations and `in` operator lookups. The mutated bits are unset dynamically after each execution to preserve memory safety. Co-authored-by: wavehs <156133648+wavehs@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. |
💡 What: Replaced
setlogic for filtering used cards in Monte Carlo inner loops with an O(1) boolean tracking array.🎯 Why: In
compute_range_vs_range_equity,forbidden = set(v_hand) | set(sampled_board)creates a new set object on every simulation iteration which causes tremendous memory allocation overhead given this loop fires millions of times.📊 Impact: Reduces total evaluation overhead per Monte Carlo simulation significantly by avoiding runtime
set()overhead in Python, leveraging direct list unrolling array lookups.🔬 Measurement: Execute
PYTHONPATH=. python evals/bench_solver.pyto observe lower latencies for the range evaluation step. Test suite assertions for this edge case confirm validity.PR created automatically by Jules for task 1942710557587784763 started by @wavehs