[core] inline pointers to avoid uneeded allocs (lto fails to heap ellide) #3284

Closed
Lizzie wants to merge 1 commit from lizzie/core-inline-optional-ptr into master
Member
  • inlines stuff into std::optional<> as opposed to std::unique_ptr<> (because yknow, we are making the Impl from an unique_ptr, allocating within an allocation is unnecessary)
  • reorganizes the structures a bit so padding doesnt screw us up (it's not perfect but eh saves a measly 44 bytes)
  • removes unused/dead code
  • uses std::vector<> instead of std::deque<>

no perf impact expected, maybe some initialisation boost but very minimal impact nonethless
lto gets rid of most calls anyways - the heavy issue is with shared_ptr and the cache coherency from the atomics... but i clumped them together because well, they kinda do not suffer from cache coherency - hopefully not a mistake

this balloons the size of Impl to about 1.67 MB - which is fine because we throw it in the stack anyways

Signed-off-by: lizzie lizzie@eden-emu.dev

- inlines stuff into std::optional<> as opposed to std::unique_ptr<> (because yknow, we are making the Impl from an unique_ptr, allocating within an allocation is unnecessary) - reorganizes the structures a bit so padding doesnt screw us up (it's not perfect but eh saves a measly 44 bytes) - removes unused/dead code - uses std::vector<> instead of std::deque<> no perf impact expected, maybe some initialisation boost but very minimal impact nonethless lto gets rid of most calls anyways - the heavy issue is with shared_ptr and the cache coherency from the atomics... but i clumped them together because well, they kinda do not suffer from cache coherency - hopefully not a mistake this balloons the size of Impl to about 1.67 MB - which is fine because we throw it in the stack anyways Signed-off-by: lizzie <lizzie@eden-emu.dev>
DraVee force-pushed lizzie/core-inline-optional-ptr from 691b834645
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
to 7e88ff2483
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
2026-01-11 05:07:12 +01:00
Compare
DraVee added this to the 0.2.0 milestone 2026-01-11 05:47:49 +01:00
DraVee force-pushed lizzie/core-inline-optional-ptr from 7e88ff2483
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
to da4e484922
All checks were successful
eden-license / license-header (pull_request) Successful in 2m11s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
2026-01-13 19:25:29 +01:00
Compare
Lizzie force-pushed lizzie/core-inline-optional-ptr from da4e484922
All checks were successful
eden-license / license-header (pull_request) Successful in 2m11s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
to 09fd1672c8
All checks were successful
eden-license / license-header (pull_request) Successful in 35s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
2026-01-15 06:04:48 +01:00
Compare
Lizzie closed this pull request 2026-01-15 10:53:29 +01:00
Member

What happened?

What happened?
All checks were successful
eden-license / license-header (pull_request) Successful in 35s
Required
Details
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published

Pull request closed

Sign in to join this conversation.
No description provided.