Performance in debug mode degraded by slow std::string::const_iterator constructor
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- performance
調査の方向性
issue ではファイルもテストも指定されていません。まず、Boost.Parser のイテレータを受け取るインターフェースを特定し、報告された MSVC のデバッグプロファイルを再現してください。妥当性のある値渡しの引数を変更し、パーサーの動作を変更せずに、デバッグ時のパフォーマンス向上を確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Unfortunately, boost.parser is very slow in debug mode.
Fortunately, this would be rather easy to change.
I have colleagues complaining because the Boost.Parser based parser takes forever in debug mode. I fired up VTune and quickly found that more than 60% of the total runtime is spent in the constructor and destructor of std::string::const_iterator. Boost.Parser is written under the assumption (it seems) that copying an iterator is basically free, which is probably true in release mode. But in MSVC/Debug it is a very expensive operation.
Looking at the code, I got the impression that in most places, nothing would be lost passing the iterators as const-ref instead of by-value. And the debug runtime would dramatically improve. Would you be open to change to const-ref for most iterator arguments? If so, I'd consider creating a Pull request doing this. Or am I missing a use case where the pass-by-value is beneficial?
- 主要言語
- C++
- スター
- 182
- フォーク
- 28
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/parser のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
boostorg/parser の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AXERA-TECH/ax-llm#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
games-on-whales/wolf#509 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug-unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/cuda-samples#453 ·