On Thursday, 30 October 2014 at 20:15:36 UTC, Steven
Schveighoffer wrote:
I think the above result is deceptive, and the test isn't very
useful. The RuntimeString toString isn't a very interesting
data point -- it's simply a single string. Not many cases are
like that. Most types have multiple members, and it's the need
to *construct* a string from that data which is usually the
issue.
But I would caution, the whole point of my query was about data
on the platforms of which Manu speaks. That is, platforms that
have issues dealing with virtual calls. x86 doesn't seem to be
one of them.
OTOH, ArrayOfStrings shows that allocating is worse by several
orders of magnitudes. This will not change on any architecture.
And the simple sink variant is still faster than the rest by
almost an order of magnitude, this may also be unlikely to be
much different on these architectures.