Skip to content

Commit fc812d9

Browse files
committed
Cache some more powers of 10 (fit tuple into 3*256 bytes).
1 parent 64d98a0 commit fc812d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/quicktions.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ except AttributeError:
5555

5656

5757
# Cache widely used 10**x int objects.
58-
DEF CACHED_POW10 = 64 # sys.getsizeof(tuple[58]) == 512 bytes in Py3.7
58+
# Py3.12/Ubuntu64: sys.getsizeof(tuple[58]) == 512 bytes, tuple[91] == 768, tuple[123] == 1024
59+
DEF CACHED_POW10 = 91
5960

6061
cdef tuple _cache_pow10():
6162
cdef int i

0 commit comments

Comments
 (0)