<div class="gmail_quote">On Sun, Jul 29, 2012 at 6:17 PM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 7/29/12 8:17 AM, Gor Gyolchanyan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
std.variant is so incredibly slow! It's practically unusable for<br>
anything, which requires even a tiny bit of performance.<br>
</blockquote>
<br></div>
You do realize you actually benchmark against a function that does nothing, right? Clearly there are ways in which we can improve std.variant to the point initialization costs assignment of two words, but this benchmark doesn't help. (Incidentally I just prepared a class at C++ and Beyond on benchmarking, and this benchmark makes a lot of the mistakes described therein...)<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
Andrei<br>
</font></span></blockquote></div><br>I do compare it with nothing, just to see how many times does it exceed the performance of static typed storage. The point is that Variant is extremely slow.<div>All I want is to find out how to implement a very fast typeless storage with maximum performance and type safety.<br clear="all">
<div><br></div>-- <br>Bye,<br>Gor Gyolchanyan.<br>
</div>