You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When examining the benchmarks for rustposix, I noticed a few odd measurements that led me to find a few bugs in the benchmark scripts.
The overall problem is that return values were not being adequately validated. (Naively, I thought this was a good idea to limit the overhead of this checking in the benchmark.) This was masking bugs.
A few examples:
In many benchmarks, the file was opened write-only. This means that reads were faster than writes, with Lind far outperforming the kernel because it would error more quickly.
In the (common) case where writes are slower than reads, this means that a benchmark that writes into a file and then reads from it, can easily read to the end of the file and keep requesting bytes. This means iterations at the end will just measure the size of a 0 byte read, regardless of the actual read buffer size.
So, as a result, I will fix those issues in PRs and also update the style guidelines to require assertions in almost all cases so that these sorts of errors can be minimized in the future.
The text was updated successfully, but these errors were encountered:
When examining the benchmarks for rustposix, I noticed a few odd measurements that led me to find a few bugs in the benchmark scripts.
The overall problem is that return values were not being adequately validated. (Naively, I thought this was a good idea to limit the overhead of this checking in the benchmark.) This was masking bugs.
A few examples:
In many benchmarks, the file was opened write-only. This means that reads were faster than writes, with Lind far outperforming the kernel because it would error more quickly.
In the (common) case where writes are slower than reads, this means that a benchmark that writes into a file and then reads from it, can easily read to the end of the file and keep requesting bytes. This means iterations at the end will just measure the size of a 0 byte read, regardless of the actual read buffer size.
So, as a result, I will fix those issues in PRs and also update the style guidelines to require assertions in almost all cases so that these sorts of errors can be minimized in the future.
The text was updated successfully, but these errors were encountered: