On Montag, 16. Mai 2016 12:32:41 CEST Mark Gaiser wrote: > Hi, > > Just a fyi since the article might be of interest to some on this list. > I just stumbled upon this github project [1]. > The article and rationale for that project can be found here [2]. > > It claims to be a stack based "variant" implementation made for performance > and as little overhead as possible. Perhaps the code has some nice tricks > that could be used to make QVariant faster? QVariant in those benchmarks, > as seen in [1], seems to be the slowest when compared to std::any, > boost::any and his own variant. > > [1] https://github.com/david-grs/static_any > [2] http://david-grs.github.io/low_latency_stack_based_boost_any/
There is still this patch that saves a memory alocation for most types (like std::string used in that benchmark): https://codereview.qt-project.org/140435/ [The problem that was raised was the fact that it does not respect the alignement. But since the current implementation does not respect it either, i don't think it should be a blocker for the patch.] Of course, there is no way we can compete with static_any that stores everything on the stack. But this has nother limitations that are not desirable for a more generic QVariant. -- Olivier Woboq - Qt services and support - https://woboq.com - https://code.woboq.org _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
