From e9ce47bb6b830631b68340c005575f74d4e14545 Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Tue, 2 Jun 2020 14:23:50 -0700 Subject: [PATCH] [iter] user-tip for better perf (#8712) --- doc/source/iter.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/iter.rst b/doc/source/iter.rst index d46d1a096..728969770 100644 --- a/doc/source/iter.rst +++ b/doc/source/iter.rst @@ -198,6 +198,11 @@ distributed training: work = [train.remote(shard) for shard in it.shards()] ray.get(work) +.. tip:: Using ParallelIterator built-in functions is typically most efficient. + For example, if you find yourself using list comprehensions like + ``[foo(x) for x in iter.gather_async()]``, consider using + ``iter.for_each(foo)`` instead! + API Reference -------------