Commit bf037aa
Stop memoizing num_subsets_larger_than_one_element
The function evaluates `2**n - n - 1` in about 109 ns, against roughly 250 ns
for the cache lookup wrapping it, so the memoization cost more than twice what
it saved. It also has no callers inside the library. Removing the decorator
drops `cache_info()` / `cache_clear()` from the function.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qi3MYsc3afQMxoWZZo2tEL1 parent 018805e commit bf037aa
2 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
94 | | - | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
| |||
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
0 commit comments