|
|
|
|
|
by anon1608
1776 days ago
|
|
As always with microbenchmarks... struct Error* create_error(const char *msg) {
struct Error *e = malloc(sizeof(struct Error));
e->msg = strdup(msg);
return e;
}
Is it measuring exceptions vs return codes, or creation cost of std::runtime_error(const char *) (small string opt?) vs malloc() + strdup? |
|