[issue32846] Deletion of large sets of strings is extra slow

2018-02-16 Thread Luís Pedro Coelho
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

[issue1149] fdopen does not work as expected

2007-09-11 Thread Luís Pedro Coelho
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