alex-petrenko / faster-fifo

Faster alternative to Python's multiprocessing.Queue (IPC FIFO queue)
MIT License
175 stars 28 forks source link

Some guidance on what "many" is #51

Open benjamin-kirkbride opened 3 months ago

benjamin-kirkbride commented 3 months ago

In some very crude tests I've done, get_many is orders of magnitude slower for getting 100 or so items at a time. Is there a rule of thumb for what constitutes "many"?

It would be cool if the benchmarks had smaller examples to help with this.

benjamin-kirkbride commented 3 months ago

get_many is orders of magnitude slower for getting 100 or so items at a time

Nevermind, I forgot to block=False :sweat_smile:

That said, I still think bench-marking smaller amounts would be nice :)

Is the code that generated the benchmarks around?

alex-petrenko commented 2 months ago

Sorry for radio silence! Yes, the code is here: https://github.com/alex-petrenko/faster-fifo/blob/master/cpp_faster_fifo/tests/comparison_tests.py

Depending on the OS/Python version the results may vary greatly!

benjamin-kirkbride commented 2 months ago

Is the code that generated the benchmarks around?

alex-petrenko commented 2 months ago

Did you check the link I provided? It's here: https://github.com/alex-petrenko/faster-fifo/blob/18c46864817c09277bab8aef74bc1b981197937b/cpp_faster_fifo/tests/comparison_tests.py#L95

benjamin-kirkbride commented 2 months ago

Sorry, I'm dumb. Thanks!!