alonso.torres 564caf7cf2 🐛 Count a new variant's value among its own property's values
Adding a variant, or duplicating a variant main into its set, gives the
new member a "Value n" in its last property. The values came from the
last entry of the properties grouped by name, which is a hash map once
a set has nine properties, so the count could come from another
property: with eight empty properties before "Property 9", the new
member took "Value 2", its source's value, and duplicated it.

Both actions now take, through one function, the first "Value n" no
member has at the position the value goes to, n counting up from one
more than the values there. Duplicating a variant main into its set
could also repeat a value in use after a member was deleted, as adding
a variant did.

Benchmark (scripts/bench-components, ms, lower 2.5% quantile):

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.529 |  0.58 |
| edit-through-a-chain-of-dependents |   68.931 |  40.136 |  0.58 |
| library-update-into-copies         |   83.083 |  45.708 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |   1.972 |  0.41 |
| main-edit-into-10-copies           |    1.790 |   0.920 |  0.51 |
| main-edit-into-100-copies          |   15.415 |   9.714 |  0.63 |
| main-edit-into-1000-copies         |  153.086 |  96.513 |  0.63 |
| variant-switch-into-copies         |   32.052 |  21.386 |  0.67 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
..
2026-11-10 20:21:16 +01:00
2026-09-29 09:07:34 +02:00
2026-03-11 15:24:40 +01:00