Re: [Python-Dev] Issue #11051: system calls per import

2011-01-31 Thread Guido van Rossum
On Sun, Jan 30, 2011 at 11:33 PM, "Martin v. Löwis" wrote: >> Maybe also >> >>    * Read and cache the directory contents and search it ourselves >>      instead of making a system call for every possible name. > > I wouldn't do that - I would expect that this is actually slower than > making the

[Python-Dev] Byte code arguments from two to one byte: did anyone try this?

2011-01-31 Thread Jurjen N.E. Bos
I tried to find any research on this subject, but I couldn't find any, so I'll be daring and vulnerable and just try it out to see what your thoughts are. I single stepped a simple loop in Python to see where the efficiency bottlenecks are. I was impressed by the optimizations already in ther

Re: [Python-Dev] Byte code arguments from two to one byte: did anyone try this?

2011-01-31 Thread Stefan Behnel
Jurjen N.E. Bos, 31.01.2011 10:17: I single stepped a simple loop in Python to see where the efficiency bottlenecks are. What version of CPython did you try that with? The latest py3k branch? Stefan ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] [RELEASED] Python 3.2 rc 2

2011-01-31 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm quite happy to announce the second release candidate of Python 3.2. Python 3.2 is a continuation of the efforts to improve and stabilize the Python 3.x line. Since the final release of Python 2.7, the 2.x

Re: [Python-Dev] Byte code arguments from two to one byte: did anyone try this?

2011-01-31 Thread Steven D'Aprano
Jurjen N.E. Bos wrote: I was impressed by the optimizations already in there, but I still dare to suggest an optimization that from my estimates might shave off a few cycles, speeding up Python about 5%. The idea is simple: change the byte code argument values from two bytes to one. Interest

Re: [Python-Dev] Issue #11051: system calls per import

2011-01-31 Thread Jussi Enkovaara
On 2011-01-30 21:43, "Martin v. Löwis" wrote: Am 30.01.2011 17:54, schrieb Alexander Belopolsky: On Sun, Jan 30, 2011 at 11:35 AM, Victor Stinner wrote: .. We should find a compromise between speed (limit the number of system calls) and the usability of Python modules. Do you have measureme

[Python-Dev] Followup: Byte code arguments from two to one byte: did anyone try this?

2011-01-31 Thread Jurjen N.E. Bos
What version of CPython did you try that with? The latest py3k branch? I had a quick look at 3.2, 2.5 and 2.7 and got the impression that the savings is more if the interpreter loop is faster: the fewer instructions there are, the bigger a 3 instruction difference would make. The NEXTAR

[Python-Dev] short fetch for NEXTARG macro (was: one byte byte code arguments)

2011-01-31 Thread Jurjen N.E. Bos
I just did it: my first python source code hack. I replaced the NEXTARG and PEEKARG macros in ceval.c using a cast to short pointer, and lo and behold, a crude measurement indicates one to two percent speed increase. That isn't much, but it is virtually for free! Here are the macro's I used:

Re: [Python-Dev] Issue #11051: system calls per import

2011-01-31 Thread Antoine Pitrou
On Mon, 31 Jan 2011 00:08:25 -0800 Guido van Rossum wrote: > > (Basically I am biased to believe that stat() is a pretty slow system > call -- this may just be old NFS lore though.) I don't know about NFS, but starting a Python interpreter located on a Samba share from a Windows VM is quite slow

Re: [Python-Dev] short fetch for NEXTARG macro (was: one byte byte code arguments)

2011-01-31 Thread Antoine Pitrou
On Mon, 31 Jan 2011 13:28:39 +0100 "Jurjen N.E. Bos" wrote: > I just did it: my first python source code hack. > I replaced the NEXTARG and PEEKARG macros in ceval.c using a cast to > short pointer, and lo and behold, a crude measurement indicates one > to two percent speed increase. > That is

Re: [Python-Dev] short fetch for NEXTARG macro (was: one byte byte code arguments)

2011-01-31 Thread Cesare Di Mauro
2011/1/31 Antoine Pitrou > On Mon, 31 Jan 2011 13:28:39 +0100 > "Jurjen N.E. Bos" wrote: > > I just did it: my first python source code hack. > > I replaced the NEXTARG and PEEKARG macros in ceval.c using a cast to > > short pointer, and lo and behold, a crude measurement indicates one > > to tw

Re: [Python-Dev] Byte code arguments from two to one byte: did anyone try this?

2011-01-31 Thread Terry Reedy
On 1/31/2011 5:31 AM, Steven D'Aprano wrote: Jurjen N.E. Bos wrote: I was impressed by the optimizations already in there, but I still dare to suggest an optimization that from my estimates might shave off a few cycles, speeding up Python about 5%. The idea is simple: change the byte code argume

Re: [Python-Dev] Byte code arguments from two to one byte: did anyone try this?

2011-01-31 Thread Cesare Di Mauro
2011/1/31 Terry Reedy > On 1/31/2011 5:31 AM, Steven D'Aprano wrote: > >> Jurjen N.E. Bos wrote: >> >>> I was impressed by the optimizations already in there, but I still >>> dare to suggest an optimization that from my estimates might shave off >>> a few cycles, speeding up Python about 5%. >>>

Re: [Python-Dev] short fetch for NEXTARG macro (was: one byte byte code arguments)

2011-01-31 Thread James Y Knight
On Jan 31, 2011, at 7:45 AM, Antoine Pitrou wrote: > On Mon, 31 Jan 2011 13:28:39 +0100 > "Jurjen N.E. Bos" wrote: >> I just did it: my first python source code hack. >> I replaced the NEXTARG and PEEKARG macros in ceval.c using a cast to >> short pointer, and lo and behold, a crude measuremen

Re: [Python-Dev] Issue #11051: system calls per import

2011-01-31 Thread Barry Warsaw
On Jan 30, 2011, at 05:35 PM, Victor Stinner wrote: >And the real question is: should we change that before 3.2 final? If we >don't change that in 3.2, it will be harder to change it later (but it >is still possible). I don't see how you possibly can without re-entering beta. Mucking with the im

[Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread techtonik
Reviewers: , Please review this at http://codereview.appspot.com/4080047/ Affected files: M Tools/msi/msi.py M Tools/msi/msilib.py Index: Tools/msi/msi.py === --- Tools/msi/msi.py(revision 88279) +++ Tools/msi/ms

Re: [Python-Dev] Issue #11051: system calls per import

2011-01-31 Thread Brett Cannon
On Mon, Jan 31, 2011 at 04:43, Antoine Pitrou wrote: > On Mon, 31 Jan 2011 00:08:25 -0800 > Guido van Rossum wrote: >> >> (Basically I am biased to believe that stat() is a pretty slow system >> call -- this may just be old NFS lore though.) > > I don't know about NFS, but starting a Python inter

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Amaury Forgeot d'Arc
Hi, 2011/1/31 : > Reviewers: , > > Please review this at http://codereview.appspot.com/4080047/ [...] It looks good, but did you create an item in the issue tracker? -- Amaury Forgeot d'Arc ___ Python-Dev mailing list Python-Dev@python.org http://mai

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread georg . brandl
Is there a bugs.python.org issue for this? http://codereview.appspot.com/4080047/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archiv

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread techtonik
There is no b.p.o issue as it's not a bug, but a tiny copy/paste patch to clean up the code a bit while I am trying to understand how to add Python to the PATH. I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is more beneficial to development as it doesn't require switching fr

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Brian Curtin
On Mon, Jan 31, 2011 at 14:45, wrote: > There is no b.p.o issue as it's not a bug, but a tiny copy/paste patch > to clean up the code a bit while I am trying to understand how to add > Python to the PATH. > > I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is > more beneficial

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Antoine Pitrou
On Mon, 31 Jan 2011 20:45:45 + techto...@gmail.com wrote: > I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is > more beneficial to development as it doesn't require switching from > console to browser for submitting changes. Ok, why don't you contribute to Mercurial instea

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Georg Brandl
Am 31.01.2011 21:45, schrieb techto...@gmail.com: > There is no b.p.o issue as it's not a bug, but a tiny copy/paste patch > to clean up the code a bit while I am trying to understand how to add > Python to the PATH. > > I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is > more

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Ethan Furman
techto...@gmail.com wrote: I see no reason for b.p.o bureaucracy. It provides a place for discussion, and makes it easier to coordinate multiple efforts. ~Ethan~ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listi

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-31 Thread anatoly techtonik
On Fri, Jan 28, 2011 at 10:34 PM, Christian Heimes wrote: > Am 28.01.2011 20:29, schrieb Raymond Hettinger: >> At the very least, we should add some prominent instructions for getting the >> command line version up and running. > > /me pops out of Guido's time machine and says: "execute > Tools/s

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-31 Thread anatoly techtonik
Ok. Here is the patch. I used Orca to reverse installer tables of Mercurial MSI and inserted similar entry for Python. Also available for review at: http://codereview.appspot.com/4023055 -- anatoly t. Index: Tools/msi/msi.py === ---

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-31 Thread Brian Curtin
On Mon, Jan 31, 2011 at 15:13, anatoly techtonik wrote: > Ok. Here is the patch. I used Orca to reverse installer tables of > Mercurial MSI and inserted similar entry for Python. > > Also available for review at: http://codereview.appspot.com/4023055 > -- > anatoly t. That's the easy part. It do

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-31 Thread anatoly techtonik
On Mon, Jan 31, 2011 at 11:24 PM, Brian Curtin wrote: > On Mon, Jan 31, 2011 at 15:13, anatoly techtonik > wrote: >> >> Ok. Here is the patch. I used Orca to reverse installer tables of >> Mercurial MSI and inserted similar entry for Python. >> >> Also available for review at: http://codereview.a

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-31 Thread Brian Curtin
On Mon, Jan 31, 2011 at 15:43, anatoly techtonik wrote: > On Mon, Jan 31, 2011 at 11:24 PM, Brian Curtin > wrote: > > On Mon, Jan 31, 2011 at 15:13, anatoly techtonik > > wrote: > >> > >> Ok. Here is the patch. I used Orca to reverse installer tables of > >> Mercurial MSI and inserted similar en

[Python-Dev] Mercurial style patch submission (Was: MSI: Remove dependency from win32com.client module (issue4080047))

2011-01-31 Thread anatoly techtonik
On Mon, Jan 31, 2011 at 10:54 PM, Antoine Pitrou wrote: > On Mon, 31 Jan 2011 20:45:45 + > techto...@gmail.com wrote: >> I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is >> more beneficial to development as it doesn't require switching from >> console to browser for submi

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread anatoly techtonik
On Mon, Jan 31, 2011 at 11:09 PM, Ethan Furman wrote: > techto...@gmail.com wrote: >> >> I see no reason for b.p.o bureaucracy. > > It provides a place for discussion, and makes it easier to coordinate > multiple efforts. Code review system provides a better space for discussion if we are speakin

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread anatoly techtonik
On Mon, Jan 31, 2011 at 10:58 PM, Georg Brandl wrote: > Am 31.01.2011 21:45, schrieb techto...@gmail.com: >> There is no b.p.o issue as it's not a bug, but a tiny copy/paste patch >> to clean up the code a bit while I am trying to understand how to add >> Python to the PATH. >> >> I see no reason

Re: [Python-Dev] Mercurial style patch submission (Was: MSI: Remove dependency from win32com.client module (issue4080047))

2011-01-31 Thread Brian Curtin
On Mon, Jan 31, 2011 at 15:50, anatoly techtonik wrote: > On Mon, Jan 31, 2011 at 10:54 PM, Antoine Pitrou > wrote: > > On Mon, 31 Jan 2011 20:45:45 + > > techto...@gmail.com wrote: > >> I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is > >> more beneficial to development

Re: [Python-Dev] Mercurial style patch submission (Was: MSI: Remove dependency from win32com.client module (issue4080047))

2011-01-31 Thread Antoine Pitrou
On Mon, 31 Jan 2011 23:50:18 +0200 anatoly techtonik wrote: > On Mon, Jan 31, 2011 at 10:54 PM, Antoine Pitrou wrote: > > On Mon, 31 Jan 2011 20:45:45 + > > techto...@gmail.com wrote: > >> I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is > >> more beneficial to developme

Re: [Python-Dev] Issue #11051: system calls per import

2011-01-31 Thread Martin v. Löwis
> Another thing to consider: on App Engine (which despite of all its > architectural weirdness uses a -- mostly -- standard Linux filesystem > for the Python code of the app) someone measured that importing from a > zipfile is much faster than importing from the filesystem. I would > imagine this e

Re: [Python-Dev] Mercurial style patch submission (Was: MSI: Remove dependency from win32com.client module (issue4080047))

2011-01-31 Thread Benjamin Peterson
2011/1/31 anatoly techtonik : > On Mon, Jan 31, 2011 at 10:54 PM, Antoine Pitrou wrote: >> On Mon, 31 Jan 2011 20:45:45 + >> techto...@gmail.com wrote: >>> I see no reason for b.p.o bureaucracy. Mercurial-style workflow [1] is >>> more beneficial to development as it doesn't require switching

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Benjamin Peterson
2011/1/31 anatoly techtonik : > On Mon, Jan 31, 2011 at 11:09 PM, Ethan Furman wrote: >> techto...@gmail.com wrote: >>> >>> I see no reason for b.p.o bureaucracy. >> >> It provides a place for discussion, and makes it easier to coordinate >> multiple efforts. > > Code review system provides a bett

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-31 Thread Ethan Furman
Brian Curtin wrote: On Mon, Jan 31, 2011 at 15:43, anatoly techtonik > wrote: That's the easy part. It doesn't cover any of the real issues with doing this. Please be more specific. It will also help if you integrate this part while it's still hot. -- anatoly t. Th

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Nick Coghlan
On Tue, Feb 1, 2011 at 7:58 AM, anatoly techtonik wrote: > To me polluting tracker with the > issues that are neither bugs nor feature requests only makes bug > triaging process and search more cumbersome. Anatoly, your constant efforts to try to force python-dev to adapt to *your* way of doing t

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread martin
What's the rationale of this change? It certainly doesn't remove the dependency from win32com.client (i.e. the code continues to depend on win32com). http://codereview.appspot.com/4080047/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-31 Thread Martin v. Löwis
Am 31.01.2011 22:13, schrieb anatoly techtonik: > Ok. Here is the patch. I used Orca to reverse installer tables of > Mercurial MSI and inserted similar entry for Python. This doesn't do uninstallation correctly. Regards, Martin ___ Python-Dev mailing l

Re: [Python-Dev] Mercurial style patch submission (Was: MSI: Remove dependency from win32com.client module (issue4080047))

2011-01-31 Thread Martin v. Löwis
>> If you don't want to receive a stupid answer, why don't you read the >> link and say what you don't like in this approach in a constructive >> manner? > > As I understand it, there used to be patc...@python.org. I'm not sure > why this was discontinued, so perhaps someone more senior should chi

Re: [Python-Dev] Mercurial style patch submission (Was: MSI: Remove dependency from win32com.client module (issue4080047))

2011-01-31 Thread Dirkjan Ochtman
On Mon, Jan 31, 2011 at 22:50, anatoly techtonik wrote: > If you don't want to receive a stupid answer, why don't you read the > link and say what you don't like in this approach in a constructive > manner? Mercurial is a much smaller project, so it has different needs. It would be nice if you co

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread techtonik
It removes the dependency from msi.py making it easier to do the rest in subsequent patches. http://codereview.appspot.com/4080047/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http:/

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread anatoly techtonik
On Tue, Feb 1, 2011 at 12:59 AM, Benjamin Peterson wrote: I see no reason for b.p.o bureaucracy. >>> >>> It provides a place for discussion, and makes it easier to coordinate >>> multiple efforts. >> >> Code review system provides a better space for discussion if we are >> speaking about

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Georg Brandl
Am 31.01.2011 22:58, schrieb anatoly techtonik: > On Mon, Jan 31, 2011 at 11:09 PM, Ethan Furman wrote: >> techto...@gmail.com wrote: >>> >>> I see no reason for b.p.o bureaucracy. >> >> It provides a place for discussion, and makes it easier to coordinate >> multiple efforts. > > Code review sys

Re: [Python-Dev] MSI: Remove dependency from win32com.client module (issue4080047)

2011-01-31 Thread Georg Brandl
Am 31.01.2011 23:05, schrieb anatoly techtonik: > On Mon, Jan 31, 2011 at 10:58 PM, Georg Brandl wrote: >> Am 31.01.2011 21:45, schrieb techto...@gmail.com: >>> There is no b.p.o issue as it's not a bug, but a tiny copy/paste patch >>> to clean up the code a bit while I am trying to understand how