Speed tests with a Stream?
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Start by running the two standalone benchmark scripts, comparing the generator loop with Stream.from_iterable() and sink_to_list(). Check the streamz documentation and implementation of source.start() and sink_to_list() to determine whether the polling loop is required. Done means documenting the expected performance and the correct standalone-script usage, or identifying a reproducible defect.
索引モデルが issue の本文から書いたものです。
説明
I am trying to compare the speed of operation when a Stream is introduced into the code. These are both scripts that need to be run.
A 'plain' Python example:
from timeit import default_timer as timer
LIMIT = 100000
def sequencer(limit=LIMIT):
num = 0
while num < limit:
yield num
num += 1
L = []
start = timer()
for i in sequencer():
L.append(i)
end = timer()
print(end - start)
This takes about 17 milliseconds to run.
An attempt to replicate the above with streamz:
from timeit import default_timer as timer
from streamz import Stream
LIMIT = 100000
def sequencer(limit=LIMIT):
num = 0
while num < limit:
yield num
num += 1
source = Stream.from_iterable(sequencer())
L = source.sink_to_list()
start = timer()
source.start()
while True:
if len(L) >= LIMIT:
break
end = timer()
print(end - start)
This takes about 1200 milliseconds to run. Is this the expected slowdown (two orders-of-magnitude)?
I am not sure though if the streamz code is correct? Its based off of the examples in the docs, but those examples all seem geared towards use in the shell rather than in standalone scripts. If you omit the while True: section, then no data ends up in the output list?
- 主要言語
- Python
- スター
- 1.3k
- フォーク
- 149
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-streamz/streamz のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
python-streamz/streamz#481 · コメント 4 件 ·
-
Combining the streamz.Stream.filenames() and streamz.Stream.from_textfile() using dask scatter? オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
python-streamz/streamz#480 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
python-streamz/streamz#479 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
python-streamz/streamz#478 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 10/100
python-streamz/streamz#476 · コメント 17 件 · リアクション 2 件 ·
python-streamz/streamz の issue をすべて見る
似ている issue
-
sponsored
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Diaoul/subliminal#1382 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
agentscope-ai/agentscope#2775 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100