File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -765,8 +765,17 @@ lazy. The filter has **almost no measurable performance cost**. To measure
765765this, we benchmarked importing all 278 top-level importable modules from the
766766Python standard library (which transitively loads 392 total modules including
767767all submodules and dependencies), then forced reification of every loaded
768- module to ensure everything was fully materialized. We compared four different
769- configurations:
768+ module to ensure everything was fully materialized.
769+
770+ Note that these measurements establish the baseline overhead of the filter
771+ mechanism itself. Of course, any user-defined filter function that performs
772+ additional work beyond a trivial check will add overhead proportional to the
773+ complexity of that work. However, we expect that in practice this overhead
774+ will be dwarfed by the performance benefits gained from avoiding unnecessary
775+ imports. The benchmarks below measure the minimal cost of the filter dispatch
776+ mechanism when the filter function does essentially nothing.
777+
778+ We compared four different configurations:
770779
771780.. list-table ::
772781 :header-rows: 1
You can’t perform that action at this time.
0 commit comments