-
-
Notifications
You must be signed in to change notification settings - Fork 464
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
perf(transformer): introduce Stack
#6093
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-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 was referenced Sep 26, 2024
This was referenced Sep 26, 2024
CodSpeed Performance ReportMerging #6093 will not alter performanceComparing Summary
|
overlookmotel
force-pushed
the
09-24-perf_transformer_introduce_nonemptystack_
branch
from
September 26, 2024 23:53
38fd630
to
87032d2
Compare
overlookmotel
force-pushed
the
09-24-perf_transformer_introduce_stack_
branch
from
September 26, 2024 23:53
30f3394
to
c98b3bb
Compare
Merge activity
|
`Stack` is a stack structure, optimized for fast push/pop and reading/writing the last entry on the stack. The difference from `NonEmptyStack` is that it can be empty. This has a different trade-off vs `NonEmptyStack`: * `Stack::new` does not allocate (`NonEmptyStack` does). * `Stack::last` and `Stack::last_mut` are fallible and contain a branch (those methods on `NonEmptyStack` are branchless and infallible). `Stack` is only the better choice if: 1. You want `new()` not to allocate. or 2. Creating initial value for `NonEmptyStack::new()` is expensive. Use `Stack` as one of the backing stores in `SparseStack`.
Dunqing
force-pushed
the
09-24-perf_transformer_introduce_nonemptystack_
branch
from
September 27, 2024 04:30
87032d2
to
ad4ef31
Compare
Dunqing
force-pushed
the
09-24-perf_transformer_introduce_stack_
branch
from
September 27, 2024 04:31
c98b3bb
to
85aff19
Compare
Base automatically changed from
09-24-perf_transformer_introduce_nonemptystack_
to
main
September 27, 2024 04:38
graphite-app
bot
deleted the
09-24-perf_transformer_introduce_stack_
branch
September 27, 2024 04:42
Boshen
added a commit
that referenced
this pull request
Sep 27, 2024
## [0.30.2] - 2024-09-27 ### Features - 60c52ba ast: Allow passing span to `void_0` method (#6065) (Dunqing) - cca433f codegen: Print `vite` / `webpack` special comments (#6021) (Dunqing) - 8d026e1 regular_expression: Implement `GetSpan` for RegExp AST nodes (#6056) (camchenry) - 7764793 regular_expression: Implement visitor pattern trait for regex AST (#6055) (camchenry) - f866781 semantic: Check for type annotations on left side of `for..in` and `for..of` iterators (#6043) (DonIsaac) - 8b2e9aa semantic: Check for JSDoc types in TS type annotations (#6042) (DonIsaac) - 28da771 transformer: Do not transform `**` with bigint literals (#6023) (Boshen) ### Bug Fixes - a88504c diagnostics: Check for terminal when displaying links (#6018) (Boshen) - 418ae25 isolated-declarations: Report uninferrable types in arrays (#6084) (michaelm) - e0a8959 minifier: Compute `void number` as `undefined` (#6028) (Boshen) - 0658576 paresr: Do not report missing initializer error in ambient context (#6020) (Boshen) - b1af73d semantic: Do not create a `global` symbol for `declare global {}` (#6040) (DonIsaac) - c8682e9 semantic,codegen,transformer: Handle definite `!` operator in variable declarator (#6019) (Boshen) ### Performance - 6b7d3ed isolated-declarations: Should clone transformed AST rather than original AST (#6078) (Dunqing) - 85aff19 transformer: Introduce `Stack` (#6093) (overlookmotel) - ad4ef31 transformer: Introduce `NonEmptyStack` (#6092) (overlookmotel) ### Documentation - 3099709 allocator: Document `oxc_allocator` crate (#6037) (DonIsaac) - d60ceb4 oxc: Add README.md and crate-level docs (#6035) (DonIsaac) - efabfc8 semantic: Improve doc comments on `Reference` methods (#6076) (overlookmotel) ### Refactor - 1fc80d1 ast: Move all ts ast related impl methods to `ast_impl` (#6015) (Dunqing) - fe696f0 codegen: Simplify printing annotation comments (#6027) (Dunqing) - e60ce50 transformer: Add `SparseStack::with_capacity` method (#6094) (overlookmotel) - 1399d2c transformer: Move `SparseStack` definition into folder (#6091) (overlookmotel) - 6bd29dd transformer: Add more debug assertions (#6090) (overlookmotel) - c90b9bf transformer: Rename `SparseStack` methods (#6089) (overlookmotel) - 2b380c8 transformer: Remove unsued `self.ctx` (#6022) (Boshen) ### Testing - 93575cd semantic: Add comprehensive regression test suite (#5976) (DonIsaac) - a4cec75 transformer: Enable tests (#6032) (overlookmotel) --------- Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack
is a stack structure, optimized for fast push/pop and reading/writing the last entry on the stack. The difference fromNonEmptyStack
is that it can be empty.This has a different trade-off vs
NonEmptyStack
:Stack::new
does not allocate (NonEmptyStack
does).Stack::last
andStack::last_mut
are fallible and contain a branch (those methods onNonEmptyStack
are branchless and infallible).Stack
is only the better choice if:new()
not to allocate. orNonEmptyStack::new()
is expensive.Use
Stack
as one of the backing stores inSparseStack
.