#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: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by bmispelon):
* stage: Ready for checkin => Accepted
Comment:
There's still some issues with the pull request:
* shai raised concerns about performance. Your benchmark has no units but
I assume it's a "smaller is better" type which means that the `lru_cache`
is less performant than the old `memoize`. Can you address that (and maybe
also show the code of your benchmark)?
* The current pull request is not python3 compatible (because of the use
of `xrange` in one of the tests)
* I don't think the test you added to show the issue of `num_args` belongs
in this pull request. While I agree that there's probably a bug there, it
should either be opened as a separate ticket or just documented since
we're deprecating `memoize` altogether.
Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/21351#comment:13>
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.f088843e95f5d3114cf9844309777b7b%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.