[pypy-issue] [issue1538] multiprocessing slower than cpython

mikefc tracker at bugs.pypy.org
Tue Jul 16 06:03:34 CEST 2013

New submission from mikefc <coolbutuseless at gmail.com>:

OSX. 4 core i5.  recent 'nightly' version of pypy

Time to run the code for cpython and pypy.

          map    multiprocessing.map
CPython   28.9          12.6
pypy      28.1          23.9

# code code code code code
import hashlib
import datetime
import multiprocessing

def f(i):
    return hashlib.md5("hello %i" % i).hexdigest()

p = multiprocessing.Pool(4)

for mapf in (map, p.map):
    start = datetime.datetime.now()
    mapf(f, xrange(2**23))
    print datetime.datetime.now() - start

messages: 5932
nosy: mikefc, pypy-issue
priority: performance bug
status: unread
title: multiprocessing slower than cpython

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list