[Python-Dev] Empty directory is a namespace?

"Martin v. Löwis" martin at v.loewis.de
Sun Jun 24 22:13:29 CEST 2012


> Should we forget to care about performance, just because different
> setups might yield different results?

No, we are not forgetting about performance. You asked for a benchmark,
I presented one.

I fail to see your problem. I claim that the performance of namespace
packages is just fine, and presented a benchmark. PJE claims that the
performance of namespace packages is fine, and provided reasoning.

If you want to see two specific scenarios compared, provide *at least*
a description of what these scenarios are. Better, just do the
benchmark then yourself.

In general, I think there is a widespread misunderstanding how new
features impact performance. There are really several cases to
be considered:
1.what is the impact of feature on existing applications which
  don't use it. This is difficult to measure since you first need
  to construct an implementation which doesn't have the feature,
  but is otherwise identical. This is often easy to reason about,
  though.
2,what is the performance of the feature when it is used. This is
  easy to measure, but difficult to evaluate. If you measure it,
  and you get some result - is that good, good enough, or bad?

For 1, it may be tempting to compare the new implementation with
the previous release. However, in the specific case, this is
misleading, since the entire import machinery was replaced. So
you really need to compare with a version of importlib that doesn't
have namespace packages.

Regards,
Martin


More information about the Python-Dev mailing list