Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #4266 will not alter performanceComparing Summary
|
|
Interesting that this change from struct-of-arrays to array-of-structs is a gain on benchmarks. However, there is another possible approach to tackling this which may be even better: oxc-project/backlog#11 However, since this PR is a perf gain at present, we could merge it now and attempt oxc-project/backlog#11 later on? #3318 (comment) is also relevant, though that's pretty tricky - we'd probably need "branded lifetimes" to make it safe. |
This PR is just an attempt at my guess, I'm not sure we want to merge it. I know you will be optimizing the whole |
|
SoA improves write performance but regresses read performance (notice drop in linter). I think we should keep SoA unless there is a win across the table + |
There are further optimizations we can make in linter, Such as we can pass
I realize this, it's something we need to think about |
dacb316 to
c6339de
Compare
c6339de to
29f251a
Compare
| pub scope_id: ScopeId, | ||
| /// Pointer to the AST Node where this symbol is declared | ||
| pub declaration: AstNodeId, | ||
| pub resolved_references: Vec<ReferenceId>, |
There was a problem hiding this comment.
Should we encapsulate these fields for future flexibility?
|
|
||
| #[derive(Debug)] | ||
| #[cfg_attr(feature = "serialize", derive(Serialize, Tsify), serde(rename_all = "camelCase"))] | ||
| pub struct Symbol { |
There was a problem hiding this comment.
Consider adding a GetSpan impl.
|
Closing this because we tried another better way to improve more in #4328 |

Combining some SymbolTable fields to the
Symbolstruct, we can reduce allocatingIndexVec. After my changes, I suddenly realized the api is much easier to use now. We no longer need thesymbol_idto get the various field value you want, you just need theSymbol