#21351: memoize function needs tests and improvements
--------------------------------------+------------------------------------
Reporter: EvilDMP | Owner: bouke
Type: Cleanup/optimization | Status: assigned
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by bouke):
As discussed on IRC, a few benchmarks comparing `memoize` with `lru_cache`
and `lru_cache`'s backport. Also, another column with the statistics
bookkeeping in the backport disabled for extra speed. These results are
achieved with `maxsize=None`.
{{{
+-------+---------+-----------------+----------+----------+
| | memoize | lru_cache (py3) | backport | no-stats |
+-------+---------+-----------------+----------+----------+
| write | 0.970 | 2.373 | 2.714 | 2.413 |
| read | 0.342 | 0.830 | 1.053 | 0.950 |
+-------+---------+-----------------+----------+----------+
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21351#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.886a81a7b16b9358747345a2efb2b267%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.