On Sun, Jul 29, 2012 at 6:17 PM, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:
On 7/29/12 8:17 AM, Gor Gyolchanyan wrote:
std.variant is so incredibly slow! It's practically unusable for
anything, which requires even a tiny bit of performance.

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...)


Andrei

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.
All I want is to find out how to implement a very fast typeless storage with maximum performance and type safety.

--
Bye,
Gor Gyolchanyan.