perf: close method-call throughput gap to blead Perl
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- performance
調査の方向性
Start with the measurement contract in issue #1196 and the existing dev/bench/benchmark_method.pl anchor; establish a pinned blead, JDK, source and JAR hashes, and JVM flags before comparing performance. Build diagnostic workloads, then use CPU, allocation, GC, and HotSpot evidence to identify bottlenecks. Done means the anchor reaches at least 1.00x pinned blead with the 95% interval lower bound at or above 1.00x, while meeting issue #1196’s portfolio contract.
索引モデルが issue の本文から書いたものです。
説明
Current state
PR #1843 improves the dev/bench/benchmark_method.pl workload through guarded argument unpacking, cached hash-field cells, reduced runtime and frame lookups, and scalar-result reuse. The remaining parity goal is open.
A fresh sequential run from PR head 0d4f883b8437b843c62b30c49d26ffac2c31a231 produced:
perl dev/bench/benchmark_method.pl: 340.14 iterations/s, checksum399600080000../jperl dev/bench/benchmark_method.pl: 267.42 iterations/s, checksum399600080000.- PerlOnJava was 0.786x of system Perl in this single run, so it needs about 27% more throughput to reach parity. Treat these as a current snapshot, not a stable estimate; the host was also running test work.
The comparison used the locally installed Perl, not a pinned optimized blead build. The next phase must establish that reference before making parity claims. Existing profiling has sampled RuntimeCode.apply/applyCachedMethod, generated method bodies, hash-field access, warning-bit lookup, and integer scalar construction. These samples identify candidates; they do not prove which cost limits end-to-end throughput.
Next steps
- Build a reproducible method benchmark runner following the measurement contract in issue #1196: pin the Perl blead revision, JDK, JAR/source hashes and JVM flags; use deterministic checksums and operation counts; warm to stability; then collect randomized paired measurement windows and confidence intervals.
- Split the anchor into diagnostic workloads for no-op dispatch, one-argument dispatch, blessed-hash reads, integer updates, scalar return, and an equivalent inline body. Keep the original method benchmark as the acceptance anchor.
- Profile the stable anchor with CPU, allocation, GC and HotSpot inlining/deoptimization evidence. Report exclusive and inclusive costs and allocated bytes per operation. Continue only with bottlenecks that explain a material share of the anchor or portfolio.
- Prioritize general call-boundary or primitive-result improvements from that evidence. Keep guarded fallbacks for
@_,caller, context, warnings, ties/overload, eval/debugger, exceptions, lvalue returns, non-local control flow, and escaping values. - Add focused semantic coverage before each runtime change; validate Perl-level tests with system Perl and run JVM/interpreter parity checks. Retain exact-parent failure evidence for each regression.
- Measure each candidate against pinned blead and the exact parent. Require the method anchor to reach at least 1.00x blead with a 95% interval whose lower bound is at least 1.00x; also meet the portfolio acceptance contract already recorded in issue #1196 before claiming project-wide performance parity.
Related work
- PR #1843: https://github.com/fglock/PerlOnJava/pull/1843
- General performance measurement and optimization plan: #1196
- Reproduction:
perl dev/bench/benchmark_method.pland./jperl dev/bench/benchmark_method.pl
- 主要言語
- Perl
- スター
- 64
- フォーク
- 8
- 平均マージ
- 5時間 44分
- マージ済み PR(30日)
- 203
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fglock/PerlOnJava のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#1579 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
fglock/PerlOnJava#1854 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
fglock/PerlOnJava#1851 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
fglock/PerlOnJava#1835 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
fglock/PerlOnJava#1820 ·
メンテナーはふだん 1 日以内に返信
fglock/PerlOnJava の issue をすべて見る
似ている issue
-
radius_audit_logs/search returns 500 when the body has no query (nil SearchOp in Vars2.Sql)対応中かも @fdurand が今日担当しました。 オープンType: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
inverse-inc/packetfence#9564 ·
メンテナーはふだん 1 日以内に返信
-
fix(api): API v3 Product Read ignores request language (lc) for sample products and image URLs対応中かも @muntasir-396 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openfoodfacts/openfoodfacts-server#15042 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
libwww-perl/URI#214 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dekobon/big-code-analysis#1644 ·
メンテナーはふだん 1 日以内に返信