Skip to content
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): nullish coalescing operator transform use SparseStack #5942

Conversation

overlookmotel
Copy link
Collaborator

@overlookmotel overlookmotel commented Sep 21, 2024

Use SparseStack (introduced in #5940) to store the stack of blocks which may need a var _temp; statement added to them. This reduces the memory required for the stack, on assumption that most blocks won't need a var statement.

Copy link

graphite-app bot commented Sep 21, 2024

Your org has enabled the Graphite merge queue for merging into main

Add 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.

Copy link

codspeed-hq bot commented Sep 21, 2024

CodSpeed Performance Report

Merging #5942 will not alter performance

Comparing 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ (5dc0154) with main (97a2c41)

Summary

✅ 29 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 09-21-fix_transformer_arrow_function_transform_prevent_stack_getting_out_of_sync branch from a2bace9 to d00d939 Compare September 21, 2024 00:51
@overlookmotel overlookmotel force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from 52fbd61 to 0f48e19 Compare September 21, 2024 00:51
@overlookmotel overlookmotel force-pushed the 09-21-fix_transformer_arrow_function_transform_prevent_stack_getting_out_of_sync branch from d00d939 to fcf4d29 Compare September 21, 2024 01:01
@overlookmotel overlookmotel force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from 0f48e19 to c1c72fc Compare September 21, 2024 01:02
@Boshen Boshen force-pushed the 09-21-fix_transformer_arrow_function_transform_prevent_stack_getting_out_of_sync branch from fcf4d29 to 824ebab Compare September 21, 2024 07:53
@Boshen Boshen force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from c1c72fc to f8bfd5e Compare September 21, 2024 07:54
@Boshen Boshen force-pushed the 09-21-fix_transformer_arrow_function_transform_prevent_stack_getting_out_of_sync branch from 824ebab to 03c3db1 Compare September 21, 2024 09:06
@Boshen Boshen force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from f8bfd5e to 9c37eba Compare September 21, 2024 09:06
@overlookmotel overlookmotel force-pushed the 09-21-fix_transformer_arrow_function_transform_prevent_stack_getting_out_of_sync branch from 03c3db1 to 6d36544 Compare September 21, 2024 09:37
@overlookmotel overlookmotel force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from 9c37eba to 77988f9 Compare September 21, 2024 09:40
@overlookmotel overlookmotel changed the base branch from 09-21-fix_transformer_arrow_function_transform_prevent_stack_getting_out_of_sync to 09-20-perf_transformer_arrow_function_transform_reduce_stack_memory_usage September 21, 2024 09:40
@Dunqing Dunqing force-pushed the 09-20-perf_transformer_arrow_function_transform_reduce_stack_memory_usage branch from 8cc4b35 to 0dedf32 Compare September 21, 2024 09:46
@Dunqing Dunqing force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from 77988f9 to 5cad15f Compare September 21, 2024 09:46
@overlookmotel overlookmotel force-pushed the 09-20-perf_transformer_arrow_function_transform_reduce_stack_memory_usage branch from 0dedf32 to 5008b88 Compare September 21, 2024 09:50
@overlookmotel overlookmotel force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from 5cad15f to 779b470 Compare September 21, 2024 09:50
@Dunqing Dunqing force-pushed the 09-20-perf_transformer_arrow_function_transform_reduce_stack_memory_usage branch 2 times, most recently from ca3e3f6 to 8a6b2e5 Compare September 21, 2024 14:17
@Dunqing Dunqing force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from 779b470 to 30c86a0 Compare September 21, 2024 14:17
@overlookmotel overlookmotel force-pushed the 09-20-perf_transformer_arrow_function_transform_reduce_stack_memory_usage branch from 8a6b2e5 to 7e76547 Compare September 21, 2024 22:11
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Sep 23, 2024 — with Graphite App
Copy link

graphite-app bot commented Sep 23, 2024

Merge activity

…tack` (#5942)

Use `SparseStack` (introduced in #5940) to store the stack of blocks which may need a `var _temp;` statement added to them. This reduces the memory required for the stack, on assumption that most blocks won't need a `var` statement.
@Dunqing Dunqing force-pushed the 09-20-perf_transformer_arrow_function_transform_reduce_stack_memory_usage branch from 7e76547 to 618e89e Compare September 23, 2024 07:52
@Dunqing Dunqing force-pushed the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch from 0abebf0 to 5dc0154 Compare September 23, 2024 07:53
Base automatically changed from 09-20-perf_transformer_arrow_function_transform_reduce_stack_memory_usage to main September 23, 2024 07:57
@graphite-app graphite-app bot merged commit 5dc0154 into main Sep 23, 2024
33 checks passed
@graphite-app graphite-app bot deleted the 09-21-perf_transformer_nullish_coalescing_operator_transform_use_sparsestack_ branch September 23, 2024 07:59
Boshen added a commit that referenced this pull request Sep 24, 2024
## [0.30.1] - 2024-09-24

### Features

- 5c323a2 minifier: Loop compressor passes (#6013) (Boshen)

### Bug Fixes

- 9ca202a codegen: Preserve newlines between comments (#6014) (Boshen)
- 4a99372 codegen: Print jsdoc comments for `TSEnumMember`s (#6007)
(camc314)
- 97a2c41 isolated-declarations: False positive for class private getter
with non-inferrable return type (#5987) (michaelm)

### Performance

- 2b17003 linter, prettier, diagnostics: Use `FxHashMap` instead of
`std::collections::HashMap` (#5993) (camchenry)
- 7b90d79 transformer: `SparseStack` always keep minimum 1 entry (#5962)
(overlookmotel)
- 28fe80a transformer: Logical assignment operator transform use
`SparseStack` (#5960) (overlookmotel)
- 9f7d4b7 transformer: Exponentiation operator transform use
`SparseStack` (#5959) (overlookmotel)
- 5dc0154 transformer: Nullish coalescing operator transform use
`SparseStack` (#5942) (overlookmotel)
- 618e89e transformer: Arrow function transform: reduce stack memory
usage (#5940) (overlookmotel)

### Documentation

- 5a0d17c ast: Document more AST nodes (#6000) (DonIsaac)
- 18371dd oxc: Include feature-guarded modules in docs.rs (#6012)
(DonIsaac)
- 1abfe8f semantic: Document `SymbolTable` (#5998) (DonIsaac)
- f5eee72 semantic: Correct docs for `Reference` (#5992) (overlookmotel)
- 860f108 transformer: Add to arrow functions transform docs (#5989)
(overlookmotel)

### Refactor

- 0a2f687 minifier: Move dce conditional expression to `RemoveDeadCode`
(#5971) (Boshen)
- f02bf51 transformer: Arrow function transform: remove unnecessary
assertion (#6002) (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
0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants