Ability to whitelist/blacklist functions from JIT
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
I maintain a decent size, long-running application using PHP.
I've been very excited about the introduction of JIT into PHP before, since as a long-running, CPU-heavy application, it stands to benefit far more from JIT than the average PHP application.
However, our attempts to rollout JIT usage have been constantly thwarted by a plague of crashes and stability issues that have made it unusable for all practical purposes. This remains true as of PHP 8.4, although I will grant that the stability of the JIT does seem a lot better since the introduction of IR.
This issue is a request for some way to whitelist/blacklist code from being JITed.
For example, there is some math-heavy code in PocketMine that benefits from tracing JIT to the tune of a 5x performance improvement. It would be a probably acceptable tradeoff to enable JIT in just that one code pathway to get that huge performance improvement, since we can test that specific part of the code heavily in isolation, while avoiding it in other areas where stability is more important.
Conversely, it would make it much easier to track down JIT issues in large applications if there were some way to blacklist code from being compiled by the JIT, so that code can be A/B tested in parts in real-world conditions.
Perhaps this could take the form of #[AllowJIT] and/or #[DenyJIT] attributes on functions, but maybe there is a better way that I'm not aware of.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue では php-src のファイル、テスト、エントリーポイントが指定されていないため、まず JIT の実装と、既存の設定または制御の仕組みを特定してください。要求されている動作は、JIT コンパイルを選択的に有効化または無効化するための設計提案なので、実装の完了を検討するには、合意された API と受け入れテストが必要になります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, php
- 領域
- compilers, performance
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100