-
-
Couldn't load subscription status.
- Fork 1.3k
Mark atom! allocated Atoms as having a 'static' lifetime and stop refcounting them
#10948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: f5130a9 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #10948 will degrade performances by 11.04%Comparing Summary
Benchmarks breakdown
|
|
Benchmark results are interesting. Looks like it is about a regression in the hash implementation which makes sense. Will work on addressing that. |
|
Whups, also a silly wasm32 breakage |
…dowed (swc-project#10947) **Related issue:** - Closes swc-project#10938
…efcounting them The Clone and Drop routines will treat them like `inline` atoms but their storage will instead be in a `static` item. This should speed up initialization and access to `atom!` values since there is no more lazy lock just a simple pointer tag. This does complicate `eq` and `hash` a bit as well as `as_str` to handle the new location This follows a similar pattern used in turbopack as of vercel/next.js#81994. Things are different here due to the use of `ThinArc` for storage, which required me to introduce a separate struct for the `&'static str` case.
No public APIs have been modified so a patch release is approrpriate
7a5fea7 to
be4a681
Compare
|
well, it looks like the The issue with Reverting to a draft while i consider this |
The Clone and Drop routines will treat them like
inlineatoms but their storage will instead be in astaticitem constructed by the macroThis should speed up initialization and access to
atom!values since there is no more lazy lock just. Instead we just take the address of a static and tag it. This does complicateeqandhasha bit as well asas_strto handle the new location.This follows a similar pattern used in turbopack as of vercel/next.js#81994. Things are different here due to the use of
ThinArcfor storage, which required me to introduce a separate struct for the&'static strcase.The motivation is simple, don't refcount values that will never be freed.