std.variant benchmark

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Sun Jul 29 07:34:45 PDT 2012


On Sun, Jul 29, 2012 at 6:17 PM, Andrei Alexandrescu <
SeeWebsiteForEmail at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120729/c5d6214b/attachment.html>


More information about the Digitalmars-d mailing list