Re: [PATCH] Removal of uses of MAX_REGISTER_SIZE

Joel Brobecker
2017-02-02T09:40:22Z

> #2 - Switch to heap allocation
>
> Or std::vector or something like that that hides it. It's not clear
> whether that would have a noticeable performance impact.

I would try that. I think using one of the standard C++ classes
looks a little more attractive to me, and would only consider
the lambda functions if we can show a noticeable performance
impact. Those two are not exclusive, by the way, but in the past,
we've always frowned on calls to alloca in a loop, and using
a xmalloc+cleanup combination has never been an issue in my cases.
I'd imagine that a standard C++ memory management class would be
fast enough for those same situations.

--
Joel