Skip to content

Add missing &#1488

Merged
robertosfield merged 1 commit into
vsg-dev:masterfrom
AnyOldName3:oops
Jun 5, 2025
Merged

Add missing &#1488
robertosfield merged 1 commit into
vsg-dev:masterfrom
AnyOldName3:oops

Conversation

@AnyOldName3

Copy link
Copy Markdown
Contributor

I'm not entirely sure how these were missed, but there were still ref and unref calls I wasn't expecting on a hot path. This takes a further five seconds off the startup time of the app I'm working on, so between this and the previous PR, that's nearly half the launch time gone.

I'm not entirely sure how these were missed, but there were still ref and unref calls I wasn't expecting on a hot path.
This takes a further five seconds off the startup time of the app I'm working on, so between this and the previous PR, that's nearly half the launch time gone.
@robertosfield

Copy link
Copy Markdown
Collaborator

I'm surprised the compiler isn't doing an optimization of this method to avoid the copy.

@robertosfield robertosfield merged commit a740bd9 into vsg-dev:master Jun 5, 2025
8 checks passed
@AnyOldName3

Copy link
Copy Markdown
Contributor Author

It's all inline, so in principle you'd think it could see that there aren't any side effects, but maybe it's extra cautious because the ref count is an atomic. The project's compiled as C++20, where atomics can be waited on, so in principle another thread could be poised to do something, in which case the optimisation wouldn't be safe.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants