These are chat archives for evhub/coconut
map$(requests.get)takes a minute,
parallel_map$(requests.get)takes 15 seconds (4x less since there're 4 cores),
concurrent_map$(requests.get)takes 6-7 seconds.
mapas a functional parallelization primitive. Good to see it's working well, and it'll definitely make its way into the next release (along with
recursive_iteratorand probably some improved lambda syntax), although that might be a little bit since I just released v1.1.1.
@evhub I wonder how an event loop-based map implementation could land in Coconut. Maybe,
async_map? Sounds clear. However, in this context,
concurrent_map would look weird IMHO. Maybe
asyncio_map, with an emphasis on that it's best suitable for IO-bound tasks? But in this case, there will be a module name in the decorator name, which may be misinterpreted. Another option is to replace threads with event loop right in
concurrent_map, but that would make it unusable with Python 2.
I think it's more of a political decision, one you as a BDFL should make :-)
mapprovide, do you think?