Possible speed-ups for get_grouped_by_powers
#16424
Labels
Effort-low
good first issue
Issues that are well-suited for new contributors
Package-novice
Performance
units
get_grouped_by_powers
#16424
This function uses
.append
. It looks like with a simple helper function (defined externally to this function) we could use a list comprehension instead. I wonder if that would be faster —append
versus function call overhead.Originally posted by @nstarman in #16392 (comment)
itertools
has a recipe for this type of dual-list creation loop. Doing two loops at the C-level might be faster than 1 loop with constant appending.The text was updated successfully, but these errors were encountered: