On May 9, 2020 9:39:18 AM Andrea Corallo <address@hidden> wrote:
Daniel Colascione <address@hidden> writes:
I agree with you in principle, but the fact that a pointer chase more is
negative for performance in a measurable way or not for this case should
be verified with a measure
Death by a thousand cuts is something that happens to lots of real
world programs. I don't want to introduce unnecessary memory
indirections or branches where simple and efficient alternatives are
known to exist and where they're just as good as the inefficient
option.
Exactly because we are talking of real world programs I think it should
be measured :)
I'll maybe have a run using the prototype (so it will prove some
usefulness) and report.
No, not in this case. This is something that might appear to be fine
in isolated tests or in modules that don't get a lot of use, but the
more people use this thing, the worse it gets, right? I don't see any
reason to *prefer* this approach to the zero cost one. Let's not be
slow for no benefit.