Re: [Python-Dev] [Python-checkins] cpython: Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX

2013-10-23 Thread Antoine Pitrou
Le Tue, 22 Oct 2013 10:54:03 +0200, Victor Stinner victor.stin...@gmail.com a écrit : Hi, Would it be possible to use os.pipe() on all OSes except AIX? Pipes and socket pairs may have minor differences, but some applications may rely on these minor differences. For example, is the buffer

Re: [Python-Dev] [Python-checkins] cpython: Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX

2013-10-23 Thread Victor Stinner
For the record, pipe I/O seems a little faster than socket I/O under Linux In and old (2006) email on LKML (Linux kernel), I read: as far as I know pipe() is now much faster than socketpair(), because pipe() uses the zero-copy mechanism. https://lkml.org/lkml/2006/9/24/121 On Linux, splice() can

Re: [Python-Dev] [Python-checkins] cpython: Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX

2013-10-23 Thread Antoine Pitrou
Le Wed, 23 Oct 2013 13:53:40 +0200, Victor Stinner victor.stin...@gmail.com a écrit : For the record, pipe I/O seems a little faster than socket I/O under Linux In and old (2006) email on LKML (Linux kernel), I read: as far as I know pipe() is now much faster than socketpair(), because

Re: [Python-Dev] [Python-checkins] cpython: Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX

2013-10-23 Thread Charles-François Natali
For the record, pipe I/O seems a little faster than socket I/O under Linux: $ ./python -m timeit -s import os, socket; a,b = socket.socketpair(); r=a.fileno(); w=b.fileno(); x=b'x'*1000 os.write(w, x); os.read(r, 1000) 100 loops, best of 3: 1.1 usec per loop $ ./python -m timeit -s

Re: [Python-Dev] [Python-checkins] cpython: Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX

2013-10-22 Thread Victor Stinner
Hi, Would it be possible to use os.pipe() on all OSes except AIX? Pipes and socket pairs may have minor differences, but some applications may rely on these minor differences. For example, is the buffer size the same? For example, in test.support, we have two constants: PIPE_MAX_SIZE (4 MB) and