-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
I recently wrote the same code against this library's Combinations.of and compared it to very similar code in Python using itertools.combinations. In both cases, I was taking combinations of 200 inputs 3 at a time (a mere 1,313,400 results), iterating over the results with for/of and doing a trivial amount of processing for each combination. The Python itertools version was several orders of magnitude faster for no apparent reason.
input is a list of 200 integers.
JS code node 15.3.0:
for (const [x, y, z] of Combination.of(input, 3)) {
}Python 3.9.0:
for [x, y, z] in itertools.combinations(input, 3):Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels