|
Boost : |
Subject: Re: [boost] Interest in a container which can hold multiple data types?
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2015-05-06 09:55:12
TONGARI J <tongari95 <at> gmail.com> writes:
>
> 2015-05-06 20:58 GMT+08:00 Joaquin M Lopez Munoz <joaquin <at> tid.es>:
>
> > Ok, understood. I've written a small performance test of
> > vector<variant<Ts...>> and sorted vector<variant<Ts...>> vs. a
> > collection class het_collection<Ts...> storing values of the same
> > type contiguously and providing a specialized for_each memfun:
> >
> > [...]
> >
> > So, unsurprisingly, het_collection does much better as for_each
> > on a vector<variant> needs to check type on each iteration. Sorting
> > the vector so that values of the same type lie together does not
> > have any impact on performance.
> >
>
> In case that you misunderstood my previous post, the assumption that when
> values of the same type liѽѡȽձÉÍձХ¸ÑÑÈÁɽɵ
¹(øÝ
̽ȽÉÉÑÕÁ±}Ùѽȵ
ÍÍÅÕ¹°¹½Ð½ÈÙѽÉ}Ù
É¥
¹Ð¸(ø(øe½Õȹ¡µ
ɬÉÍձХ̥¹Ý¡
ÐÝáÁÑ°Ý¡
Ð$±¥Ñ¼Í¥Ì(øÑ¡½µÁ
ɥͽ¸Ñݸ©½Éɨ¡Ñ}½±±Ñ¥½¸
¹ÙѽÉ}Ù
É¥
¹Ð¸()eÌ°¥¹¥Ñ±ä$´¹½ÐÕ±±äÑÑ¥¹å½ÕÈÁ½¥¹Ð°µä
Á½±½¥Ì¸]¡
Ð)¼å½Ôµ
¸ä½ÉÉ¡Ñ}½±±Ñ¥½¸ü̥ХÌÍ¥¹¡Ñ}½±±Ñ¥½¸)±ÕÍÑÉÌÙ
±Õ̽ѡÍ
µÑåÁѽѡȸ¸¼å½Ôµ
¸ÙÉÍ¥½¸Ý¡É)Ñ¡½ÉȽ¥¹ÍÉÑ¥½¸¥Ì
É¥ÑÉ
Éä
Ì¥¸ÙѽÈü%ͼ°
¹ä͹ͥ±)Í¥¸½ÍÕ ¡Ñ}½±±Ñ¥½¹}ØÈݽձ½¥°½Ý¸Ñ¼Í¹Ñ¥
±±äÑ¡)Í
µ
ÌÙѽÈñÙ
É¥
¹Ðø°$Í
ä¸())½
Å×µ¸43ÍÁè5׎è)Q±Í¹¥
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk