GTests: BLI_task: Add basic tests for BLI_task_parallel_listbase(), and some performa...
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 4 Jun 2019 21:23:55 +0000 (23:23 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 4 Jun 2019 21:51:03 +0000 (23:51 +0200)
commit1324659dee4981bce37557febb446710547fb646
tree20b3f2339e11f00a023312e647f4b7e3692d6d1e
parent30d9366d17328a5f15a32e537c0a2969ea82bd3f
GTests: BLI_task: Add basic tests for BLI_task_parallel_listbase(), and some performances benchmarks.

Nothing special to mention about regression test itself, it basically
mimics the one for `BLI_task_parallel_mempool()`...

Basic performances benchmarks do not tell us much, besides the fact that
for very light processing of listbase, even with 100k items,
single-thread remains an order of magnitude faster than threaded code.
Synchronization is just way too expensive in that case with current
code. This should be partially solvable with much bigger (and
configurable) chunk sizes though (current ones are just ridiculous
for such cases ;) )...
tests/gtests/blenlib/BLI_task_performance_test.cc [new file with mode: 0644]
tests/gtests/blenlib/BLI_task_test.cc
tests/gtests/blenlib/CMakeLists.txt