Performance of this deep equal implementation is generally proportionally between 5x slower and 700x slower compared to native deepStrictEqual
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- performance
調査の方向性
src/tests/self.ts の 324-386 行付近にあるベンチマークから始め、ネイティブの deepStrictEqual との比較を再現してください。報告されている配列およびオブジェクトのケースに対して deep-equal の実装をプロファイルし、その後、同じベンチマークでパフォーマンスの変化を検証し、正しさに変化がないことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
I have a test implemented here using my test/benchmark library. I've also taken the plot that this generates and hosted it publicly on the net here: https://unphased.github.io/static-sharing/2024-03-29/deepequal_perf/deepequal_perf_collisions.html
I like this method of sharing benchmark results in HTML format since the plot made with uplot allows for interacting with series and zooming in.
The general summary based on the above plotting is that although this deep-equal implementation does not have an asymptotic algorithmic shortcoming compared to the builtin (as demonstrated by the straight lines in the first plot), it is consistently between 5x slower (if I compare large arrays filled with integers) and 700x (!!) slower (if I compare large arrays filled with objects). Obviously being implemented in js as opposed to presumably C++ will necessitate a 2-10x performance hit, something seems suboptimal here because this is a lot slower than that.
I first became aware of the issue being in this library by seeing it show up in the chrome profiler. I haven't reviewed the code yet, but based on the flamegraph that I saw, the implementation appears to be a recursive one. And that doesn't bode well for performance, but I would expect even a recursive implementation to be faster than what I'm seeing.
Please let me know if any of this is unclear.
- 主要言語
- JavaScript
- スター
- 792
- フォーク
- 107
- 平均マージ
- 9日 20時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
inspect-js/node-deep-equal のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
inspect-js/node-deep-equal#112 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
inspect-js/node-deep-equal#110 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
inspect-js/node-deep-equal#108 · コメント 5 件 ·
-
Dependency Dashboardオープン
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
inspect-js/node-deep-equal の issue をすべて見る
似ている issue
-
ai core enhancement good first issue testing
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
cli: `studio --request <missing file>` answers with a raw ENOENT/EISDIR instead of a clear error対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
laaielichter/Ai-edit-studio#81 ·
メンテナーはふだん 1 日以内に返信