A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-April/088359.html below:

[Python-Dev] pyc files, constant folding and borderline portability issues

[Python-Dev] pyc files, constant folding and borderline portability issuesskip at pobox.com skip at pobox.com
Mon Apr 6 18:57:44 CEST 2009
    Cesare> At this time with Python 2.6.1 we have these results:
    Cesare> def f(): return 1 + 2 * 3 + 4j
    ...
    Cesare> def f(): return ['a', ('b', 'c')] * (1 + 2 * 3)

Guido can certainly correct me if I'm wrong, but I believe the main point of
his message was that you aren't going to encounter a lot of code in Python
which is amenable to traditional constant folding.  For the most part, they
will be assigned to symbolic "constants", which, unlike C preprocessor
macros aren't really constants at all.  Consequently, the opportunity for
constant folding is minimal and probably introduces more opportunities for
bugs than performance improvements.

Skip
More information about the Python-Dev mailing list

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