Closed kylebarron closed 4 years ago
slower than what? On Lambda it's faster than more threads.
Is 'futures.ThreadPoolExecutor' with only 1 thread slower than using a for loop (_single_threaded)?
Oh I don't think I ever tested that, or if I did I can't remember what I found
🤦 well in fact I did benchmark this https://github.com/vincentsarago/threadbench#1-image
So yeah not using threads seems faster!
Wow looking at those benchmarks again, not using threads vs a threadpool of 1 thread is significantly faster.
Did you use this PR for testing?
@kylebarron nope I used a simple app https://github.com/vincentsarago/threadbench/blob/master/tests/test_benchmarks.py#L26-L52
@kylebarron I'm not sure to remember what we agreed here, are we sure that
futures.ThreadPoolExecutor(max_workers=1)
is slower ?