[New-bugs-announce] [issue16390] re compilation slow in Python 3.3 due to functools.lru_cache overhead

Brett Cannon report at bugs.python.org
Fri Nov 2 19:34:24 CET 2012


New submission from Brett Cannon:

The Mako developers discovered that under Python 3.3 their library under the mako_v2 benchmark went from 2.95x slower than Python 2.7 to 1.25x slower by simply avoiding an re compilation: http://www.makotemplates.org/trac/changeset/c1468b12f115ac9e469150ce24ea042aeae5e270

Their profiling showed that functools.lru_cache in rc._compiled_typed was a major contributor: http://paste.ofcode.org/yZRKnJfTsHesFR8hMWfc7f

----------
components: Library (Lib)
messages: 174554
nosy: brett.cannon, pjenvey
priority: normal
severity: normal
stage: needs patch
status: open
title: re compilation slow in Python 3.3 due to functools.lru_cache overhead
type: performance
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16390>
_______________________________________


More information about the New-bugs-announce mailing list