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

Use SWC for compilation as it has better dead-code-elimination #1608

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Sep 11, 2024

Output size (using dust)

See also #1606 (for fixed usage without SWC)

DevProd
This PR
cd packages/\@glimmer
du --ignore_hidden \
   --reverse --apparent-size \
   --filter ".+\/dist\/dev\/index.js$" \
   --no-percent-bars --only-dir --depth 1
cd packages/\@glimmer
du --ignore_hidden \
   --reverse --apparent-size \
   --filter ".+\/dist\/prod\/index.js$" \
   --no-percent-bars --only-dir --depth 1

main
cd packages/\@glimmer
du --ignore_hidden \
   --reverse --apparent-size \
   --filter ".+\/dist\/dev\/index.js$" \
   --no-percent-bars --only-dir --depth 1
   
609K └─┬ .
168K   ├── runtime
168K   ├── syntax
104K   ├── compiler
 63K   ├── opcode-compiler
 23K   ├── manager
 19K   ├── validator
 17K   ├── util
 13K   ├── program
8.9K   ├── reference
6.0K   ├── destroyable
4.5K   ├── vm
4.1K   ├── node
3.7K   ├── global-context
2.5K   ├── wire-format
966B   ├── encoder
844B   ├── vm-babel-plugins
502B   └── owner
cd packages/\@glimmer
du --ignore_hidden \
   --reverse --apparent-size \
   --filter ".+\/dist\/prod\/index.js$" \
   --no-percent-bars --only-dir --depth 1

253K └─┬ .
 73K   ├── syntax
 69K   ├── runtime
 49K   ├── compiler
 22K   ├── opcode-compiler
7.1K   ├── manager
6.8K   ├── util
5.7K   ├── program
4.1K   ├── validator
3.7K   ├── reference
2.8K   ├── vm
2.1K   ├── node
1.7K   ├── destroyable
1.6K   ├── wire-format
563B   ├── global-context
511B   ├── encoder
469B   ├── vm-babel-plugins
155B   └── owner

previously (pre #1606)

DevProd
main
cd packages/\@glimmer
du --ignore_hidden \
   --reverse --apparent-size \
   --filter ".+\/dist\/dev\/index.js$" \
   --no-percent-bars --only-dir --depth 1
   
650K └─┬ .
181K   ├── runtime
162K   ├── syntax
104K   ├── compiler
 63K   ├── opcode-compiler
 29K   ├── debug
 23K   ├── manager
 19K   ├── validator
 17K   ├── util
 13K   ├── program
9.5K   ├── reference
6.2K   ├── destroyable
5.5K   ├── global-context
5.0K   ├── vm
4.2K   ├── node
2.4K   ├── wire-format
967B   ├── encoder
870B   ├── vm-babel-plugins
497B   └── owner
cd packages/\@glimmer
du --ignore_hidden \
   --reverse --apparent-size \
   --filter ".+\/dist\/prod\/index.js$" \
   --no-percent-bars --only-dir --depth 1

301K └─┬ .
 80K   ├── runtime
 74K   ├── syntax
 50K   ├── compiler
 25K   ├── opcode-compiler
 21K   ├── debug
 11K   ├── manager
8.7K   ├── util
7.6K   ├── validator
5.9K   ├── program
4.1K   ├── reference
3.0K   ├── destroyable
2.8K   ├── vm
2.1K   ├── node
1.6K   ├── wire-format
1.4K   ├── global-context
604B   ├── encoder
469B   ├── vm-babel-plugins
155B   └── owner

Copy link

duration phase estimated regression +173ms [78ms to 267ms] OR +1.28% [0.58% to 1.98%]
renderEnd phase no difference [-2ms to 2ms]
render1000Items1End phase estimated regression +22ms [12ms to 32ms] OR +2.13% [1.12% to 3.05%]
clearItems1End phase no difference [-4ms to 2ms]
render1000Items2End phase estimated improvement -34ms [-45ms to -26ms] OR -4.25% [-5.61% to -3.27%]
clearItems2End phase no difference [-2ms to 1ms]
render5000Items1End phase estimated improvement -37ms [-67ms to -7ms] OR -0.98% [-1.79% to -0.2%]
clearManyItems1End phase estimated improvement -6ms [-9ms to -3ms] OR -2.64% [-4% to -1.33%]
render5000Items2End phase estimated regression +101ms [72ms to 133ms] OR +3.01% [2.14% to 3.95%]
clearManyItems2End phase no difference [-2ms to 2ms]
render1000Items3End phase estimated regression +34ms [17ms to 50ms] OR +4.7% [2.36% to 7.06%]
append1000Items1End phase no difference [-43ms to 28ms]
append1000Items2End phase estimated regression +35ms [22ms to 49ms] OR +4.79% [3.02% to 6.69%]
updateEvery10thItem1End phase no difference [-1ms to 5ms]
updateEvery10thItem2End phase no difference [0ms to 4ms]
selectFirstRow1End phase estimated regression +3ms [2ms to 6ms] OR +2.8% [1.9% to 5.24%]
selectSecondRow1End phase no difference [0ms to 2ms]
removeFirstRow1End phase estimated regression +3ms [0ms to 16ms] OR +1.4% [0.11% to 6.75%]
removeSecondRow1End phase estimated regression +1ms [0ms to 16ms] OR +0.41% [0.1% to 7.38%]
swapRows1End phase no difference [-1ms to 0ms]
swapRows2End phase no difference [0ms to 1ms]
clearItems4End phase estimated improvement -4ms [-6ms to -3ms] OR -3.04% [-4.27% to -1.79%]
paint phase no difference [0ms to 0ms]

[17:29:13] Generating Benchmark Reports [started]
[17:29:22] Generating Benchmark Reports [completed]

Benchmark Reports    

JSON: /home/runner/work/glimmer-vm/glimmer-vm/tracerbench-results/compare.json

PDF: /home/runner/work/glimmer-vm/glimmer-vm/tracerbench-results/artifact-1.pdf

HTML: /home/runner/work/glimmer-vm/glimmer-vm/tracerbench-results/artifact-1.html

@NullVoxPopuli
Copy link
Contributor Author

NullVoxPopuli commented Oct 2, 2024

Blocked on: swc-project/swc#9610

Minimal Repro here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant