Files
owniverse/tests/artifacts/physical_totals_step2_results.json
Kirill c42940369a Refactor capacity enforcement and production logic
- Updated `enforce_capacity` function to accept an optional `physical` parameter, allowing for more flexible handling of physical amounts.
- Modified `initialize_life_batches` to return physical amounts after enforcing capacity, improving data flow.
- Enhanced `try_production` to utilize shared physical amounts, reducing redundant calculations.
- Adjusted `stellar_environment` to accept an optional `quantities` parameter, streamlining its usage.
- Added new test results for physical totals to validate performance improvements across various scenarios.
2026-10-08 21:10:36 +03:00

871 lines
20 KiB
JSON

{
"delta_seconds": 0.2,
"input_sha256": {
"all_objects_speed6": "44bee3b3753fa51615f766d8f800a10cc2b70c8e7fb4ea12b6e18da7f07a7d67",
"many_objects_fragmented_stars_cycle": "1e95ef398923f26b912a305c84f9b3eb502d24cb14e8ae687a4becccf047324a"
},
"order": "before-after-after-before",
"profile_enabled": true,
"runs": [
{
"cycles": 20,
"max_ms": 409.924,
"mean_ms": 374.42165,
"min_ms": 321.955,
"model": "before",
"profile": {
"assign_homes": [
23286,
80
],
"civilization_flow_capacity": [
120325,
20
],
"civilization_flow_colonies": [
49609,
20
],
"civilization_flow_finish": [
167957,
20
],
"civilization_flow_ledger": [
890864,
20
],
"civilization_flow_plan": [
2156571,
20
],
"civilization_operator_build": [
59939,
20
],
"civilization_operator_solve": [
667995,
860
],
"enforce_capacity": [
338483,
80
],
"generation_products": [
186561,
40
],
"generation_withdrawal": [
530120,
60
],
"generations": [
2635468,
20
],
"initialize": [
112680,
20
],
"newborn_batches": [
118343,
3016
],
"physical_amounts_build": [
488368,
360
],
"production": [
543976,
20
],
"trends": [
348509,
20
]
},
"run": 1,
"save": "all_objects_speed6",
"validation": "",
"years": 400000
},
{
"cycles": 20,
"max_ms": 396.498,
"mean_ms": 366.8874,
"min_ms": 316.948,
"model": "after",
"profile": {
"assign_homes": [
23679,
80
],
"civilization_flow_capacity": [
121355,
20
],
"civilization_flow_colonies": [
52357,
20
],
"civilization_flow_finish": [
134122,
20
],
"civilization_flow_ledger": [
867762,
20
],
"civilization_flow_plan": [
2171014,
20
],
"civilization_operator_build": [
60589,
20
],
"civilization_operator_solve": [
672927,
860
],
"enforce_capacity": [
313233,
80
],
"generation_products": [
188758,
40
],
"generation_withdrawal": [
537217,
60
],
"generations": [
2691969,
20
],
"initialize": [
113057,
20
],
"newborn_batches": [
119560,
3016
],
"physical_amounts_build": [
283727,
200
],
"production": [
371874,
20
],
"trends": [
352124,
20
]
},
"run": 1,
"save": "all_objects_speed6",
"validation": "",
"years": 400000
},
{
"cycles": 20,
"max_ms": 400.433,
"mean_ms": 367.76455,
"min_ms": 317.346,
"model": "after",
"profile": {
"assign_homes": [
23679,
80
],
"civilization_flow_capacity": [
120585,
20
],
"civilization_flow_colonies": [
52508,
20
],
"civilization_flow_finish": [
133714,
20
],
"civilization_flow_ledger": [
873014,
20
],
"civilization_flow_plan": [
2178049,
20
],
"civilization_operator_build": [
60872,
20
],
"civilization_operator_solve": [
674461,
860
],
"enforce_capacity": [
312963,
80
],
"generation_products": [
189817,
40
],
"generation_withdrawal": [
538355,
60
],
"generations": [
2697406,
20
],
"initialize": [
113617,
20
],
"newborn_batches": [
119833,
3016
],
"physical_amounts_build": [
283294,
200
],
"production": [
370613,
20
],
"trends": [
354430,
20
]
},
"run": 2,
"save": "all_objects_speed6",
"validation": "",
"years": 400000
},
{
"cycles": 20,
"max_ms": 412.947,
"mean_ms": 379.94895,
"min_ms": 327.79,
"model": "before",
"profile": {
"assign_homes": [
23817,
80
],
"civilization_flow_capacity": [
120810,
20
],
"civilization_flow_colonies": [
50245,
20
],
"civilization_flow_finish": [
170562,
20
],
"civilization_flow_ledger": [
901208,
20
],
"civilization_flow_plan": [
2186592,
20
],
"civilization_operator_build": [
61551,
20
],
"civilization_operator_solve": [
676571,
860
],
"enforce_capacity": [
342898,
80
],
"generation_products": [
190410,
40
],
"generation_withdrawal": [
538869,
60
],
"generations": [
2675372,
20
],
"initialize": [
114216,
20
],
"newborn_batches": [
120558,
3016
],
"physical_amounts_build": [
495969,
360
],
"production": [
554663,
20
],
"trends": [
353982,
20
]
},
"run": 2,
"save": "all_objects_speed6",
"validation": "",
"years": 400000
},
{
"cycles": 20,
"max_ms": 463.763,
"mean_ms": 441.44965,
"min_ms": 386.031,
"model": "before",
"profile": {
"assign_homes": [
17806,
60
],
"civilization_flow_capacity": [
136652,
20
],
"civilization_flow_colonies": [
230107,
20
],
"civilization_flow_finish": [
196342,
20
],
"civilization_flow_ledger": [
1825154,
20
],
"civilization_flow_plan": [
2292865,
20
],
"civilization_operator_build": [
62146,
20
],
"civilization_operator_solve": [
680101,
860
],
"enforce_capacity": [
288185,
60
],
"generation_products": [
77590,
20
],
"generation_withdrawal": [
800537,
40
],
"generations": [
2298719,
20
],
"initialize": [
141855,
20
],
"newborn_batches": [
54592,
1490
],
"physical_amounts_build": [
745858,
300
],
"production": [
747261,
20
],
"trends": [
356732,
20
]
},
"run": 1,
"save": "many_objects_fragmented_stars_cycle",
"validation": "",
"years": 400000
},
{
"cycles": 20,
"max_ms": 445.055,
"mean_ms": 423.0315,
"min_ms": 374.104,
"model": "after",
"profile": {
"assign_homes": [
17840,
60
],
"civilization_flow_capacity": [
137440,
20
],
"civilization_flow_colonies": [
231537,
20
],
"civilization_flow_finish": [
137928,
20
],
"civilization_flow_ledger": [
1782223,
20
],
"civilization_flow_plan": [
2310391,
20
],
"civilization_operator_build": [
61962,
20
],
"civilization_operator_solve": [
687903,
860
],
"enforce_capacity": [
238360,
60
],
"generation_products": [
77666,
20
],
"generation_withdrawal": [
802637,
40
],
"generations": [
2360346,
20
],
"initialize": [
141317,
20
],
"newborn_batches": [
54930,
1490
],
"physical_amounts_build": [
356207,
140
],
"production": [
405364,
20
],
"trends": [
357407,
20
]
},
"run": 1,
"save": "many_objects_fragmented_stars_cycle",
"validation": "",
"years": 400000
},
{
"cycles": 20,
"max_ms": 441.891,
"mean_ms": 422.9136,
"min_ms": 376.819,
"model": "after",
"profile": {
"assign_homes": [
17821,
60
],
"civilization_flow_capacity": [
136949,
20
],
"civilization_flow_colonies": [
231992,
20
],
"civilization_flow_finish": [
137312,
20
],
"civilization_flow_ledger": [
1788156,
20
],
"civilization_flow_plan": [
2297486,
20
],
"civilization_operator_build": [
61993,
20
],
"civilization_operator_solve": [
683317,
860
],
"enforce_capacity": [
238430,
60
],
"generation_products": [
78170,
20
],
"generation_withdrawal": [
804912,
40
],
"generations": [
2364256,
20
],
"initialize": [
141451,
20
],
"newborn_batches": [
54900,
1490
],
"physical_amounts_build": [
354476,
140
],
"production": [
407287,
20
],
"trends": [
358298,
20
]
},
"run": 2,
"save": "many_objects_fragmented_stars_cycle",
"validation": "",
"years": 400000
},
{
"cycles": 20,
"max_ms": 465.049,
"mean_ms": 444.87595,
"min_ms": 392.884,
"model": "before",
"profile": {
"assign_homes": [
17906,
60
],
"civilization_flow_capacity": [
136963,
20
],
"civilization_flow_colonies": [
229784,
20
],
"civilization_flow_finish": [
196495,
20
],
"civilization_flow_ledger": [
1839904,
20
],
"civilization_flow_plan": [
2302987,
20
],
"civilization_operator_build": [
62518,
20
],
"civilization_operator_solve": [
683660,
860
],
"enforce_capacity": [
289846,
60
],
"generation_products": [
78882,
20
],
"generation_withdrawal": [
808021,
40
],
"generations": [
2328372,
20
],
"initialize": [
142755,
20
],
"newborn_batches": [
54963,
1490
],
"physical_amounts_build": [
754056,
300
],
"production": [
754898,
20
],
"trends": [
358634,
20
]
},
"run": 2,
"save": "many_objects_fragmented_stars_cycle",
"validation": "",
"years": 400000
}
],
"speed": 6,
"reference_commit": "9357f757a95db96274d4e115c7e498b58eca6902",
"exact_differential": {
"cycles": 10,
"inputs": [
"all_objects_speed6",
"many_objects_fragmented_stars_cycle"
],
"delta_seconds": [
0.2,
0.53,
0.31,
0.2,
0.2
],
"equal_full_states": true
},
"checks": {
"flow_commit": 1971,
"civilization_flows": 1895,
"civilization_state": 70,
"frame_evolution": 38,
"production_transaction": 14,
"stellar_rules": 333
},
"summary": {
"all_objects_speed6": {
"before": {
"mean_ms": 377.1853,
"cycles_per_second": 2.651216789201488,
"profile_ms": {
"assign_homes": 1.177575,
"civilization_flow_capacity": 6.028375,
"civilization_flow_colonies": 2.49635,
"civilization_flow_finish": 8.462975,
"civilization_flow_ledger": 44.8018,
"civilization_flow_plan": 108.579075,
"civilization_operator_build": 3.03725,
"civilization_operator_solve": 33.61415,
"enforce_capacity": 17.034525000000002,
"generation_products": 9.424275,
"generation_withdrawal": 26.724725,
"generations": 132.771,
"initialize": 5.6724,
"newborn_batches": 5.972524999999999,
"physical_amounts_build": 24.608425,
"production": 27.465975,
"trends": 17.562275000000003
},
"profile_calls_per_cycle": {
"assign_homes": 4.0,
"civilization_flow_capacity": 1.0,
"civilization_flow_colonies": 1.0,
"civilization_flow_finish": 1.0,
"civilization_flow_ledger": 1.0,
"civilization_flow_plan": 1.0,
"civilization_operator_build": 1.0,
"civilization_operator_solve": 43.0,
"enforce_capacity": 4.0,
"generation_products": 2.0,
"generation_withdrawal": 3.0,
"generations": 1.0,
"initialize": 1.0,
"newborn_batches": 150.8,
"physical_amounts_build": 18.0,
"production": 1.0,
"trends": 1.0
}
},
"after": {
"mean_ms": 367.32597499999997,
"cycles_per_second": 2.7223775830173733,
"profile_ms": {
"assign_homes": 1.18395,
"civilization_flow_capacity": 6.0485,
"civilization_flow_colonies": 2.621625,
"civilization_flow_finish": 6.6959,
"civilization_flow_ledger": 43.519400000000005,
"civilization_flow_plan": 108.726575,
"civilization_operator_build": 3.036525,
"civilization_operator_solve": 33.6847,
"enforce_capacity": 15.6549,
"generation_products": 9.464375,
"generation_withdrawal": 26.8893,
"generations": 134.734375,
"initialize": 5.66685,
"newborn_batches": 5.984825,
"physical_amounts_build": 14.175525,
"production": 18.562175,
"trends": 17.66385
},
"profile_calls_per_cycle": {
"assign_homes": 4.0,
"civilization_flow_capacity": 1.0,
"civilization_flow_colonies": 1.0,
"civilization_flow_finish": 1.0,
"civilization_flow_ledger": 1.0,
"civilization_flow_plan": 1.0,
"civilization_operator_build": 1.0,
"civilization_operator_solve": 43.0,
"enforce_capacity": 4.0,
"generation_products": 2.0,
"generation_withdrawal": 3.0,
"generations": 1.0,
"initialize": 1.0,
"newborn_batches": 150.8,
"physical_amounts_build": 10.0,
"production": 1.0,
"trends": 1.0
}
},
"reduction_percent": 2.613920797019398
},
"many_objects_fragmented_stars_cycle": {
"before": {
"mean_ms": 443.1628,
"cycles_per_second": 2.2565070894939736,
"profile_ms": {
"assign_homes": 0.8927999999999999,
"civilization_flow_capacity": 6.840375,
"civilization_flow_colonies": 11.497275,
"civilization_flow_finish": 9.820924999999999,
"civilization_flow_ledger": 91.62644999999999,
"civilization_flow_plan": 114.8963,
"civilization_operator_build": 3.1166,
"civilization_operator_solve": 34.094025,
"enforce_capacity": 14.450775,
"generation_products": 3.9118000000000004,
"generation_withdrawal": 40.21395,
"generations": 115.677275,
"initialize": 7.11525,
"newborn_batches": 2.738875,
"physical_amounts_build": 37.49785,
"production": 37.553975,
"trends": 17.88415
},
"profile_calls_per_cycle": {
"assign_homes": 3.0,
"civilization_flow_capacity": 1.0,
"civilization_flow_colonies": 1.0,
"civilization_flow_finish": 1.0,
"civilization_flow_ledger": 1.0,
"civilization_flow_plan": 1.0,
"civilization_operator_build": 1.0,
"civilization_operator_solve": 43.0,
"enforce_capacity": 3.0,
"generation_products": 1.0,
"generation_withdrawal": 2.0,
"generations": 1.0,
"initialize": 1.0,
"newborn_batches": 74.5,
"physical_amounts_build": 15.0,
"production": 1.0,
"trends": 1.0
}
},
"after": {
"mean_ms": 422.97254999999996,
"cycles_per_second": 2.364219616615783,
"profile_ms": {
"assign_homes": 0.891525,
"civilization_flow_capacity": 6.859725,
"civilization_flow_colonies": 11.588225,
"civilization_flow_finish": 6.881,
"civilization_flow_ledger": 89.25947500000001,
"civilization_flow_plan": 115.19692500000001,
"civilization_operator_build": 3.098875,
"civilization_operator_solve": 34.2805,
"enforce_capacity": 11.91975,
"generation_products": 3.8959,
"generation_withdrawal": 40.188725,
"generations": 118.11505,
"initialize": 7.0691999999999995,
"newborn_batches": 2.74575,
"physical_amounts_build": 17.767075000000002,
"production": 20.316275,
"trends": 17.892625
},
"profile_calls_per_cycle": {
"assign_homes": 3.0,
"civilization_flow_capacity": 1.0,
"civilization_flow_colonies": 1.0,
"civilization_flow_finish": 1.0,
"civilization_flow_ledger": 1.0,
"civilization_flow_plan": 1.0,
"civilization_operator_build": 1.0,
"civilization_operator_solve": 43.0,
"enforce_capacity": 3.0,
"generation_products": 1.0,
"generation_withdrawal": 2.0,
"generations": 1.0,
"initialize": 1.0,
"newborn_batches": 74.5,
"physical_amounts_build": 7.0,
"production": 1.0,
"trends": 1.0
}
},
"reduction_percent": 4.5559442263655825
}
},
"candidate_script_sha256": {
"civilization_flow.gd": "5d2b5f5a90fc9182ac1f933d473441457be28b47800a0081b1409614dd28aab5",
"civilization_state.gd": "ae0832531c7ce244e6939793007b3d7be5bd32246be6c209a75fdb5e3e6ffe7a",
"civilization_evolution.gd": "24efc14eedee5e8a28422262e37e6c54e1a0c403a164bd8f4c96d749f89ac61f",
"evolution_coordinator.gd": "0b8cec7e53f047698545e9b97c986b99e0ea5bfc61a6b0177335aedb442e6048",
"object_ledger.gd": "f7fbfeb4be905b525ad91648167ed1e32c4d3b77553549c69c3ebb808ac99b4b",
"manual_production.gd": "138a94d3bb7d63470f2ca2eb841badef910ec27f3e247c5c9ed8e925c0971fa4",
"automatic_production.gd": "dba9f98cbecc90ad9935653c39f7fcfad53edb3ca2670bbce4e1594b58b399a5",
"universe_environment.gd": "e31c87b38a4ec0052f3d43f7be2af51ee7612a48fadcf0b5072ba678107e576e"
}
}