Luís Pedro Coelho <l...@luispedro.org> added the comment:
Original poster here.
The benchmark is artificial, but the problem setting is not. I did have a
problem that is roughly:
interesting = set(line.strip() for line in open(...))
for line in open(...):
key,rest = line
New submission from Luís Pedro Coelho:
from os import *
def Fork():
b = fork()
if b 0:
raise Exception('fork() failed')
return b
r,w=pipe()
b = Fork()
if b == 0:
dup2(w,1)
close(w)
execlp('echo',\
'echo',\
'Hello world')
else:
for line in fdopen