Separating benchmarks with different complexity and benchmarks with just variants
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- ruby
調査の方向性
まず、リンク先の Array#bsearch 対 Array#find の例を含む、リポジトリのベンチマーク例を確認し、CRuby の結果を参照されている TruffleRuby のベンチマークと比較してください。完了時には、計算量に起因する結果と実装に依存するバリエーションを分け、提案されている注意点を追加する必要がありますが、この issue ではファイルやテストは特定されていません。
索引モデルが issue の本文から書いたものです。
説明
Hello there,
I think it would be worthwhile to separate the example in two categories:
- Benchmarks which are faster due to the variants having different complexity (for example, https://github.com/JuanitoFatas/fast-ruby#arraybsearch-vs-arrayfind-code). Those I believe will remain with a clear advantage for one of the variants for a long time.
- Other benchmarks, where the difference is minimal, and highly relies on the specific Ruby implementation and version, and where the slow and fast variants might switch regularly.
I think the second category deserves a clear warning that those results were measured on some version of CRuby and might not apply anymore, and likely do not apply to other Ruby implementations.
For fun, @gogainda ran these benchmarks on TruffleRuby at https://github.com/gogainda/fast-truffleruby
What I can see from a quick look is many of the differences on MRI don't exist on TruffleRuby (e.g., Sequential vs Parallel Assignment).
Also, many of these micro benchmarks optimize away (>1 billion i/s), i.e., in other words doing that operation alone costs basically nothing or like <10 cycles, which I interpret as a useful word of caution against microbenchmarks which might test something real code wouldn't, and might show differences that don't matter in practice.
I'd recommend in general to benchmark in the setup of your app/program, on the machine where the performance will matter. For example, a variant might give be 25% faster in a microbenchmark, but yield a 0% speedup on the full app and therefore be of limited value.
- 主要言語
- Ruby
- スター
- 5.7k
- フォーク
- 370
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fastruby/fast-ruby のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
fastruby/fast-ruby の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
simp/pupmod-simp-simp#395 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
simp/pupmod-simp-rsyslog#219 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
simp/pupmod-simp-pupmod#256 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
simp/pupmod-simp-sudo#150 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100