Skip to content

feat(allocator/vec2): implement extend_desugared method as extend internal implemention#9881

Closed
Dunqing wants to merge 5 commits intomainfrom
03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention
Closed

feat(allocator/vec2): implement extend_desugared method as extend internal implemention#9881
Dunqing wants to merge 5 commits intomainfrom
03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Mar 19, 2025

No description provided.

Copy link
Member Author

Dunqing commented Mar 19, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 19, 2025

CodSpeed Instrumentation Performance Report

Merging #9881 will create unknown performance changes

Comparing 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention (4a23056) with main (61d825b)

Summary

🆕 12 new benchmarks
⁉️ 3 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 isolated-declarations[vue-id.ts] N/A 58.8 ms N/A
⁉️ linter[RadixUIAdoptionSection.jsx] 2.7 ms N/A N/A
⁉️ linter[cal.com.tsx] 1.2 s N/A N/A
⁉️ linter[checker.ts] 3.1 s N/A N/A
🆕 mangler[antd.js] N/A 16 ms N/A
🆕 mangler[react.development.js] N/A 294 µs N/A
🆕 mangler[typescript.js] N/A 39.5 ms N/A
🆕 minifier[antd.js] N/A 163.5 ms N/A
🆕 minifier[react.development.js] N/A 1.8 ms N/A
🆕 minifier[typescript.js] N/A 287.7 ms N/A
🆕 transformer[RadixUIAdoptionSection.jsx] N/A 134.9 µs N/A
🆕 transformer[antd.js] N/A 47.7 ms N/A
🆕 transformer[cal.com.tsx] N/A 30.9 ms N/A
🆕 transformer[checker.ts] N/A 22.3 ms N/A
🆕 transformer[pdf.mjs] N/A 10.2 ms N/A

@Dunqing Dunqing changed the base branch from 03-13-feat_allocator_vec2_align_the_retain_method_with_the_standard_implementation to graphite-base/9881 March 19, 2025 03:02
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from 711ad2e to 834e350 Compare March 19, 2025 03:02
@Dunqing Dunqing force-pushed the graphite-base/9881 branch from edee838 to e637e2e Compare March 19, 2025 03:02
@Dunqing Dunqing changed the base branch from graphite-base/9881 to main March 19, 2025 03:03
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch 10 times, most recently from 32dd4d6 to 063f74f Compare March 19, 2025 06:47
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch 7 times, most recently from 425056d to 4c440c8 Compare April 26, 2025 04:35
@graphite-app graphite-app bot changed the base branch from 04-23-perf_traverse_use_arenastring_instead_compactstring_to_stote_uid_name to graphite-base/9881 April 27, 2025 02:39
@graphite-app graphite-app bot force-pushed the graphite-base/9881 branch from 1f6b2ac to bdcbeb4 Compare April 27, 2025 02:47
@graphite-app graphite-app bot force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from ccd4f56 to f3a1216 Compare April 27, 2025 02:47
@graphite-app graphite-app bot changed the base branch from graphite-base/9881 to main April 27, 2025 02:47
@graphite-app graphite-app bot force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from f3a1216 to 6dcd83c Compare April 27, 2025 02:47
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from 6dcd83c to 956cc02 Compare April 27, 2025 12:06
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from 956cc02 to 414dfb2 Compare April 28, 2025 09:20
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch 3 times, most recently from 8956293 to 204ad53 Compare April 28, 2025 13:31
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from 204ad53 to 8c63d72 Compare April 28, 2025 13:45
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from 62e58b2 to 1c729a4 Compare April 28, 2025 14:04
@Dunqing Dunqing force-pushed the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch from c03155e to 4a23056 Compare April 28, 2025 23:46
graphite-app bot pushed a commit that referenced this pull request Apr 29, 2025
Found while working on #9881, this PR aims to optimize inserting statements by reducing an unnecessary `Vec` allocation.

Previously, `get_var_statement` would collect `var` statement and `let` statement into a `std::vec::Vec` and return it, then immediately `extend`/`insert` to another `ArenaVec`. Considering here only have two elements, we don't need to store them in a `Vec`, just return them, and use them depending on how they are used.

Seems to have very minor improvement, and I guess `transformer/checker.ts` has 0.1 regression is noisy.

<img width="767" alt="image" src="https://github.com/user-attachments/assets/c0aeeb5a-e2da-4e2a-9990-56b239f6ab65" />
@Dunqing
Copy link
Member Author

Dunqing commented May 16, 2025

This is a testing PR, the real work has been done in #10670.

@Dunqing Dunqing closed this May 16, 2025
@Boshen Boshen deleted the 03-19-feat_allocator_vec2_implement_extend_desugared_method_as_extend_internal_implemention branch August 30, 2025 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-isolated-declarations Isolated Declarations A-minifier Area - Minifier A-parser Area - Parser A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants