Comment by vanderZwan
Comment by vanderZwan 11 days ago
You accidentally included the array initialization in the benchmarked code ("setup block" vs "boilerplate block"), dwarfing everything else. If we're talking about an already allocated array the difference is pretty big:
… but in a way you're correct that this is rarely the actual bottleneck in the surrounding code. Still, "death by a thousand papercuts" and all that. Plus having old-school for-loops as a habit makes it easier to spot the true botllenecks.
... derp, yes. It was way too early in the morning, and I misread "is part of the benchmark" as "is not part of the benchmark"...