Proposal:
A number of functions in _pylong.py craft their own schemes to cache costly ** results. This complicates their code, and all of them end up doing more work than necessary.
So I want to add a new internal compute_powers() function that computes all and only the powers needed in advance, and returns a dict recording the results. It should speed things, but not by much (the time is dominated by how long it takes to compute the single largest power needed). The real point is code simplification.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Proposal:
A number of functions in
_pylong.pycraft their own schemes to cache costly**results. This complicates their code, and all of them end up doing more work than necessary.So I want to add a new internal
compute_powers()function that computes all and only the powers needed in advance, and returns a dict recording the results. It should speed things, but not by much (the time is dominated by how long it takes to compute the single largest power needed). The real point is code simplification.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
_pylong.py#118611