Make compilation faster :rocket:
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- cpp, wasm
- 領域
- compilers, performance
調査の方向性
この issue には、once-reduction、precompute-propagate、dae、heap2local、inlining、vacuum などのパスについて、-O3 の時間計測と malloc のカウントが記載されていますが、ファイル名やテストは示されていません。まず 50MB の j2cl 出力で測定を再現し、それらのパスをプロファイリングしてください。完了の条件は、コンパイル時間が文書化され、測定可能な形で短縮されることです。
索引モデルが issue の本文から書いたものです。
説明
I did some investigation on the speed of compilation. This is getting important because of things like j2cl output which is a 50MB real-world file.
Slowest passes: (in -O3; note that some passes run more than once)
[PassRunner] running pass: precompute-propagate... 14.23460 seconds.
[PassRunner] running pass: dae... 10.91160 seconds.
[PassRunner] running pass: heap2local... 10.44350 seconds.
[PassRunner] running pass: precompute-propagate... 9.07261 seconds.
[PassRunner] running pass: inlining... 8.02837 seconds.
[PassRunner] running pass: once-reduction... 8.02484 seconds.
[PassRunner] running pass: vacuum... 5.16162 seconds.
[PassRunner] running pass: vacuum... 3.64088 seconds.
[PassRunner] running pass: vacuum... 3.58191 seconds.
[PassRunner] running pass: vacuum... 3.61897 seconds.
perf reports almost 15% of time is spent in malloc/free methods - quite a lot. I counted how many mallocs (note: not the size of them) are done in each pass, here are the heaviest (note: timings here include the overhead of counting mallocs atomically among threads, so those matter less):
once-reduction... 9.51466 seconds. 141558196 mallocs.
precompute-propagate... 14.7426 seconds. 61611533 mallocs.
dae... 11.3789 seconds. 53792948 mallocs.
precompute-propagate... 9.69919 seconds. 39531493 mallocs.
heap2local... 10.5116 seconds. 38582302 mallocs.
local-cse... 4.70765 seconds. 33454468 mallocs.
cfp... 2.43619 seconds. 32292682 mallocs.
ssa-nomerge... 4.92099 seconds. 26378117 mallocs.
simplify-locals-nostructure... 6.03281 seconds. 22663794 mallocs.
vacuum... 5.10813 seconds. 23880789 mallocs.
inlining... 107.781 seconds. 20940365 mallocs.
dce... 3.84722 seconds. 20025273 mallocs.
local-subtyping... 3.44374 seconds. 19067529 mallocs.
and vacuum runs 3 more times:
vacuum... 3.71648 seconds. 16648663 mallocs.
vacuum... 3.86917 seconds. 16302767 mallocs.
vacuum... 3.89855 seconds. 16162915 mallocs.
Help in speeding things up would be very welcome!
- 主要言語
- WebAssembly
- スター
- 8.6k
- フォーク
- 885
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 77
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebAssembly/binaryen のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
WebAssembly/binaryen#9135 · コメント 1 件 ·
-
難易度 2/5 半日 初心者へのやさしさ 76/100
WebAssembly/binaryen#9018 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WebAssembly/binaryen#9133 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
WebAssembly/binaryen#9123 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
WebAssembly/binaryen#9122 ·
WebAssembly/binaryen の issue をすべて見る
似ている issue
-
flang:fir-hlfir
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
llvm/llvm-project#225935 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
objectionary/eo#8923 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend オープンcoarray
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100