A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-December/018851.html below:

[Python-Dev] nested scopes confusion

[Python-Dev] nested scopes confusion [Python-Dev] nested scopes confusionThomas Heller thomas.heller@ion-tof.com
Tue, 4 Dec 2001 22:04:31 +0100
From: "Jeremy Hylton" <jeremy@zope.com>
> >>>>> "TH" == Thomas Heller <thomas.heller@ion-tof.com> writes:
> 
>   >> But the performance characteristics of class vs. function is
>   >> really the bottleneck of your application?  Are you sure that
>   >> nested fuctions are really cheaper?
> 
>   TH> Calling a.test() takes 3.3 microseconds, and c.test() takes 3.16
>   TH> microseconds.
> 
> So I 5% difference, based on a single set of measurements with one
> compiler/platform/etc., is enough to go out of your way to avoid
> classes?
No. The test only shows (or suggests for this particular compiler/platform)
that calling methods (which are using nested scopes) has the same
speed than normal methods and not a factor of 5 or whatever
slowdown of callable classes.

>   That seems conceivable for some very small set of
> applications, but not in general.
True.

Thomas




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4