Closed vrurg closed 4 years ago
Thank you for the patch. I definitely agree that accepting Iterable
is important.
Can you help me understand, is it sufficient to just change the existing when
clause to say when Positional | Iterable
? Or does that not work for some reason? I'd prefer to not add another clause with essentially identical code.
Also, it would be nice to add a test case, if there is some specific new behavior here.
Unless there is something I miss in use of gather
for Positional
, then both cases could successfully be joined together. The reason I didn't do it in first place was this uncertainty.
In either case, map
should be faster than gather
/take
.
And a test, yes... I'll be back later today with both patches on my hands.
Ok, done and hopefully ready for merge.
Thanks again for your help. Sorry that it took so long for me to get back to it!
No worries, I'm overloaded too. Just asking not to forget to release a new version soon. :)
With this PR it is possible to pass not only
Positional
s as a key value, but also anyIterable
. Especially makes sense forHyperSeq
in cases like:A real-life example renders 4100 rows SQLite database in 5.5-6sec, comparing to 27-28sec without this patch and
hyper
. Tested on a 8-core i9 MacBook Pro.