
The variant implementation (in GIL at least) performs a constant time dispatch. (Assuming the compiler reduces a switch statement of consecutive integers to constant time dispatch). Lubomir
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost- bounces@lists.boost.org] On Behalf Of Mathias Gaunard Sent: Friday, June 29, 2007 11:31 AM To: boost@lists.boost.org Subject: Re: [boost] [variant] RTTI
Michael Marcin wrote:
I need something similar to variant to optimize dynamic dispatches in 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: http://lists.boost.org/mailman/listinfo.cgi/boost