lf-lang / benchmarks-lingua-franca

2 stars 4 forks source link

Fix matrix multiplication benchmark for Rust #8

Closed jhaye closed 2 years ago

jhaye commented 2 years ago

The draining iterator that I removed here would drop remaining work items if the queue contained more items than there were workers. This would end computation prematurely.

Validation now succeeds both in the single-threaded and multi-threaded case. Performance is now much more in line with other implementations like C++.\ Unfortunately, due to the use of mutexes to resolve resource competition, the benchmark's performance profile does not improve with additional workers. However, that also means there are not data races.