You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.
Cross referencing a possible performance issue with Iterators.subsets() and Combinatorics.combinations() that I posted in Combinatorics.jlJuliaMath/Combinatorics.jl#30
The performance of subsets() seems to be ~2x slower than pure python Itertools. Sample code to reproduce is in the original post referenced above.
# with Iterators.subsets()
1.164676 seconds (47.23 M allocations: 1.830 GB, 14.97% gc time)
# with Combinatorics.combinations()
1.597081 seconds (56.66 M allocations: 2.814 GB, 15.08% gc time)
# In Pure Python itertools.
Elapsed time 0.5022 seconds
The text was updated successfully, but these errors were encountered:
The reason the Python code is so fast is it uses the reference counter directly to reclaim memory in cases where the item generated is used and then discarded (a common pattern). Unfortunately, that can't be done here. I'm not sure what the best way forward is, but #73 should help a little bit.
Cross referencing a possible performance issue with
Iterators.subsets()
andCombinatorics.combinations()
that I posted inCombinatorics.jl
JuliaMath/Combinatorics.jl#30The performance of
subsets()
seems to be ~2x slower than pure pythonItertools
. Sample code to reproduce is in the original post referenced above.The text was updated successfully, but these errors were encountered: