From 366ccecb7dd4bf958a4b3aa2a29523cf34a27378 Mon Sep 17 00:00:00 2001 From: John McCardle Date: Sun, 28 Dec 2025 00:46:43 -0500 Subject: [PATCH] chore: Extend benchmark to test 5000 entities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Validate SpatialHash scalability with larger entity counts. Results at 5,000 entities: - N×N visibility: 216.9× faster (431ms → 2ms) - Single query: 37.4× faster (0.11ms → 0.003ms) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- tests/benchmarks/entity_scale_benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/benchmarks/entity_scale_benchmark.py b/tests/benchmarks/entity_scale_benchmark.py index 3bfae69..07d562a 100644 --- a/tests/benchmarks/entity_scale_benchmark.py +++ b/tests/benchmarks/entity_scale_benchmark.py @@ -29,8 +29,8 @@ GRID_SIZE = (100, 100) # 10,000 cells - entities will actually see each other # Full suite - may timeout on large counts due to O(n²) visibility # ENTITY_COUNTS = [100, 500, 1000, 2500, 5000, 10000] -# Quick suite for initial baseline (on 100x100 grid, these give densities of 1-20%) -ENTITY_COUNTS = [100, 500, 1000, 2000] +# Extended suite to validate scalability (on 100x100 grid) +ENTITY_COUNTS = [100, 500, 1000, 2000, 5000] QUERY_RADIUS = 15 # Smaller radius for smaller grid MOVEMENT_PERCENT = 0.10 # 10% of entities move each frame N2N_SAMPLE_SIZE = 50 # Sample size for N×N visibility test