Skip to content

Optimise PopsAggregate by using IndexedFlatMaps#734

Merged
wvpm merged 1 commit into
masterfrom
optimise_pops_aggregate_via_indexing
May 19, 2026
Merged

Optimise PopsAggregate by using IndexedFlatMaps#734
wvpm merged 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 2 times, most recently from 524279f to 016dd41 Compare May 19, 2026 11:45
@Spartan322 Spartan322 force-pushed the optimise_pops_aggregate_via_indexing branch from 016dd41 to 3d53f45 Compare May 19, 2026 12:55
@wvpm wvpm merged commit d3843fe into master May 19, 2026
16 checks passed
@Spartan322 Spartan322 deleted the optimise_pops_aggregate_via_indexing branch May 19, 2026 13:00
@wvpm wvpm added performance and removed enhancement New feature or request labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants