Thanks Victor for improving this. I also have to note, version 3 is only in the case of tuple in tuple slower. If you use a flat tuple it is faster than version 2. So I asked for this corner case and thought the recursion detection or something else has a huge cost.
For pyc files, I think the highest available version is the used default. I didn't know version 4, nowhere mentioned in the docs. Also figured out, that every integer is accepted as protocol version. But was usable for tests against 3.3 and 2.7. :-) On Mon, Jan 27, 2014 at 5:02 PM, Brett Cannon <br...@python.org> wrote: > > > > On Mon, Jan 27, 2014 at 10:42 AM, Paul Moore <p.f.mo...@gmail.com> wrote: > >> On 27 January 2014 15:35, Victor Stinner <victor.stin...@gmail.com> >> wrote: >> > Version 2 is the fastest in Python 3.3 and 3.4, but version 4 with >> > Python 3.4 produces the smallest file. >> >> Which version is used when creating pyc files? This benchmark might >> suggest that version 2 is the best... >> > > Importlib just uses the default: > http://hg.python.org/cpython/file/dbad4564cd12/Lib/importlib/_bootstrap.py#l671 > > -- bye by Wolfgang
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com