On Mon, Jul 8, 2024 at 10:08 PM 'Robert Engels' via golang-nuts <golang-nuts@googlegroups.com> wrote:
> Given this code (which I know is not “correct”): Setting b.N in the benchmark code has no specified behavior. The actual behavior at the moment ignores such changes. The algorithm used by the testing package adjusts b.N in an attempt to stabilize the results under certain conditions. Ignoring this guidance makes all attempts of that algorithm futile. And as it assumes the benchmark body was executed b.N times anyway, it computes garbage. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-UK65F%3DNp%2BkS59w_y-G%2BSQeFoh5V9b8Ezgt9TkGuzx-7g%40mail.gmail.com.