Paul Eggert wrote: > On my Pop_OS! laptop it's way slower than it was on any > of your measured VMs: > > $ time ./test-pthread-rwlock > Starting test_rwlock ...Alarm clock > > real 10m0.002s > user 90m18.341s > sys 9m38.634s
Indeed, that's 5 times slower... > Alternatively we could work around the performance bug, though that may > be too much work to justify. It's more than a performance bug. If a program seems to work fine on a system with 1 or 2 CPUs but consumes a time exponential in numCPUs, due to writer starvation or reader starvation, that's a fundamental problem. It's worse than the strstr O(n²) problem, because while strstr takes a long run time for _larger_ inputs, the rwlock problem makes the program take a long run time for the _same_ inputs. Bruno