Bump to 0.8.0, close Target 12, and record what is still missing
Collision changed the collide slot's signature and grew four public structs, so this is an ABI break and the soname moves to libakgl.so.0.8. The manual's counts move with it: 195 functions across 23 headers, 183 of which return an error context. Target 12 -- "collision for 256 actors under 2 ms without the caller writing a broad phase" -- is met. A new benchmark times the whole step with a world attached, which is the number the target is actually about rather than a narrowphase call in isolation: 15.4 us at 64 actors, and 54.1 us at 256 in a purpose-built -DAKGL_MAX_HEAP_ACTOR=256 configuration. Over that 4x range the step grew 3.5x while the all-pairs control grew 15.6x, which is the n-squared the index exists to avoid. Plan item 7 is rewritten to record what shipped and why both partitioners exist; the Construct and Phaser citations stay. Three new TODO entries. Actor rotation, scoped to the five places it touches and the one place it does not -- collision_support is written so rotating `dir` in and the answer back is the whole narrowphase change, and rotational *response* is explicitly a different piece of work. The swept narrowphase FLAG_BULLET reserves, with the tunnelling arithmetic written out so a game can check its own numbers against 1280 px/s. And the ccd arena being single-threaded and sized by measurement at 7,264 bytes per GJK/EPA box pair. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzBDV2fqgnUAcqCKqKvc71
This commit is contained in:
@@ -317,6 +317,7 @@ Added in 0.8.0. Every row below is from one run, on the machine described above.
|
||||
| grid query, 64 actors | query | 43.2 | 23,155,384 |
|
||||
| bsp query, 64 actors | query | 113.6 | 8,802,193 |
|
||||
| tile query, actor standing on a floor | query | 15.6 | 64,142,653 |
|
||||
| **a whole physics step with collision, 64 actors** | frame | 15,420.1 | 64,851 |
|
||||
|
||||
Three of those are worth reading rather than skimming.
|
||||
|
||||
@@ -335,6 +336,29 @@ in its row, so the gap in a scene that is actually moving is wider than 2.6x.
|
||||
one number: an actor walking across a tile pays that on most frames and pays the
|
||||
re-cell only when it crosses a boundary.
|
||||
|
||||
#### The whole step, which is the number that matters
|
||||
|
||||
**15.4 µs for 64 actors, of which 1.6 µs is the step without collision.** So
|
||||
collision costs about 13.8 µs a frame at the default pool size — the proxy sync
|
||||
pass, the broad phase, the narrowphase over whatever it returns, and the response
|
||||
— which is **0.08% of a 16.67 ms frame**. The all-pairs control over the same
|
||||
population is 12.1 µs, and it answers a strictly smaller question: it tests pairs
|
||||
and does not sync, sub-step or resolve anything.
|
||||
|
||||
At `-DAKGL_MAX_HEAP_ACTOR=256`, a separate build measured on the same machine:
|
||||
|
||||
| Operation | Unit | ns per unit |
|
||||
|---|---|---:|
|
||||
| a whole physics step with collision, 256 actors | frame | 54,073.3 |
|
||||
| all-pairs control over the same 256 actors (32,640 pairs) | sweep | 188,530.6 |
|
||||
|
||||
**54.1 µs against Target 12's 2 ms budget**, with the all-pairs control 3.5x more
|
||||
expensive while still doing less. Population went up 4x and the step went up 3.5x,
|
||||
which is the grid doing its job: the all-pairs sweep went up 15.6x over the same
|
||||
range, as `n²` says it must. That measurement is from a `AKGL_BENCH_SCALE=0.3`
|
||||
run of a purpose-built configuration and is not part of the CI baseline; the 64
|
||||
row above is.
|
||||
|
||||
### Two rows moved, and not because collision is running
|
||||
|
||||
`akgl_physics_simulate` over 64 live actors went from 1,216.8 ns to 1,588.5, and
|
||||
|
||||
Reference in New Issue
Block a user