Skip to content

Optimise PopsAggregate by using IndexedFlatMaps#734

Open
wvpm wants to merge 1 commit into
masterfrom
optimise_pops_aggregate_via_indexing
Open

Optimise PopsAggregate by using IndexedFlatMaps#734
wvpm wants to merge 1 commit into
masterfrom
optimise_pops_aggregate_via_indexing

Conversation

@wvpm
Copy link
Copy Markdown
Contributor

@wvpm wvpm commented May 15, 2026

IndexedFlatMap is much faster than fixed_point_map_t as that uses hash-based lookups whilst the former uses indexing.
Since this code is called every gamestate update, it is a hot-path and thus performance matters here.

Note breaks godot, I'll fix that later.

@wvpm wvpm requested a review from a team as a code owner May 15, 2026 14:49
@wvpm wvpm added enhancement New feature or request topic:society labels May 15, 2026
@wvpm wvpm force-pushed the optimise_pops_aggregate_via_indexing branch from abd629b to d6d3e5d Compare May 15, 2026 14:49
@wvpm wvpm enabled auto-merge May 15, 2026 14:51
@wvpm wvpm force-pushed the optimise_pops_aggregate_via_indexing branch 3 times, most recently from 8d0d0c3 to 1b9e71c Compare May 19, 2026 11:29
Comment thread src/openvic-simulation/InstanceManager.hpp Outdated
@wvpm wvpm force-pushed the optimise_pops_aggregate_via_indexing branch from 1b9e71c to 524279f Compare May 19, 2026 11:43
@wvpm wvpm force-pushed the optimise_pops_aggregate_via_indexing branch from 524279f to 016dd41 Compare May 19, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request topic:society

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants