Closed maxsharabayko closed 5 days ago
Group 25 Mbps sending (2 members)
Before:
After:
Nonabench does not show any notable difference though.
| ns/op | op/s | err% | ins/op | cyc/op | IPC | bra/op | miss% | total | benchmark
|--------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------
| 375.68 | 2,661,822.68 | 1.0% | 565.09 | 446.53 | 1.266 | 93.00 | 1.3% | 0.01 | `iota on vector::data()`
| 376.70 | 2,654,634.99 | 1.2% | 565.09 | 446.59 | 1.265 | 93.00 | 1.3% | 0.01 | `iota on vector::begin()`
#include <numeric>
#include <vector>
#define ANKERL_NANOBENCH_IMPLEMENT
#include <nanobench.h>
int main() {
std::vector<char> payload(1500);
char seqno = 0;
ankerl::nanobench::Bench().run("iota on vector::data()", [&] {
std::iota(payload.data(), payload.data() + payload.size(), seqno);
++seqno;
});
seqno = 0;
ankerl::nanobench::Bench().run("iota on vector::begin()", [&] {
std::iota(payload.begin(), payload.end(), seqno);
++seqno;
});
}
25 Mbps sending on MX4.
Before:
After: