diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-02-08 12:14:30 -0600 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-08 14:56:57 -0500 |
| commit | 82e0cd15711c7171aed7af5e481967cc721c9642 (patch) | |
| tree | b9dc5991715b92e00ae53697c3787a69bb4c33ca /tests/generic_inline_admin | |
| parent | 32e6a7d3a57b2287d55e8b8efa4e8cb7643b1720 (diff) | |
Optimized allow_lazy() by not generating a new lazy wrapper on each invocation.
This dramatically improves performance on PyPy. The following benchmark:
python -mtimeit -s "from django.utils.functional import allow_lazy; from django.utils.translation import ugettext_lazy; f = allow_lazy(lambda s: s, str)" "f(ugettext_lazy('abc'))"
goes from 390us per loop to 165us.
Diffstat (limited to 'tests/generic_inline_admin')
0 files changed, 0 insertions, 0 deletions
