Skip to content

Adopt bitsets#10

Open
RandomHashTags wants to merge 35 commits intomainfrom
adopt-bitsets
Open

Adopt bitsets#10
RandomHashTags wants to merge 35 commits intomainfrom
adopt-bitsets

Conversation

@RandomHashTags
Copy link
Owner

@RandomHashTags RandomHashTags commented Mar 8, 2026

Use bit sets where possible (for game days, times, locations, entry ids) as a drop-in replacement for heap allocated solutions in an effort improve schedule generation performance (and throughput), mentioned in #3 . Using @_specialized is unfortunately required since it performs horribly without it.

Fixes #5 .

A lot of the data structure had to be updated to support this change and we fallback to the heap allocated solutions for odd-ball schedules.


~45% throughput increase over #9 with no change to the failure rate.

- this commit replaces the `Set<LeagueTimeIndex` and `Set<LeagueLocationIndex` with the new bit set
- refactors to fully support bitsets
- removed some code
- moved some code to their own files
- bitset fixes and performance improvements
- removed `public` visibility from a lot of stuff since they aren't meant to be available (left over from legacy code)
@RandomHashTags RandomHashTags self-assigned this Mar 8, 2026
@RandomHashTags RandomHashTags added enhancement New feature or request semver/major Semantic Version MAJOR changes (made incompatible API changes) unit tests Relates to unit tests in some way performance Relates to performance labels Mar 8, 2026
@RandomHashTags
Copy link
Owner Author

RandomHashTags commented Mar 9, 2026

Shouldn't merge until Swift 6.3 is released because it contains a compilation error fix (only when building in release mode) for SILFunctionTransform "CopyPropagation" that these changes hit.

@RandomHashTags RandomHashTags added semver/minor Semantic Version MINOR changes (added functionality in a backward compatible manner) and removed semver/major Semantic Version MAJOR changes (made incompatible API changes) labels Mar 16, 2026
@RandomHashTags RandomHashTags changed the title Adopt bitsets (major breaking changes) Adopt bitsets Mar 16, 2026
@RandomHashTags
Copy link
Owner Author

RandomHashTags commented Mar 16, 2026

Also shouldn't merge before figuring out why these changes now cause more schedule generation/unit test failures (mainly b2b schedules)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request performance Relates to performance semver/minor Semantic Version MINOR changes (added functionality in a backward compatible manner) swift 6.3 unit tests Relates to unit tests in some way

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore bit sets

1 participant