Boost logo

Boost :

From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2007-06-29 14:36:46

The variant implementation (in GIL at least) performs a constant time
(Assuming the compiler reduces a switch statement of consecutive
integers to constant time dispatch).


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-
> bounces_at_[hidden]] On Behalf Of Mathias Gaunard
> Sent: Friday, June 29, 2007 11:31 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] [variant] RTTI
> Michael Marcin wrote:
> > I need something similar to variant to optimize dynamic dispatches
> my
> > application much like what GIL uses. Unfortunately one of my target
> > platforms does not support RTTI.
> variant doesn't really optimize dispatch. It probably does a binary
> search among the different possible types. Virtual functions are way
> more efficient.
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at