Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2008-01-13 05:22:22


Tobias Schwinger wrote:
> Joel de Guzman wrote:
>> Richard wrote:
>>> [Please do not mail me a copy of your followup]
>>>
>>> boost_at_[hidden] spake the secret code
>>> <fmblls$ees$1_at_[hidden]> thusly:
>>>
>>>> I also urge Steven to pursue the dynamic_switch idea I posted
>>>> which employs perfect hashing at compile time whereby allowing
>>>> equivalent or faster than a switch dispatch at runtime where
>>>> the cases are dynamic (instead of compile time constants).
>>> I just want to say that I think this approach is so amazingly cool, my
>>> socks are not only blown off, but orbiting the planet :-).
>> Yes, it's so cool. I believe it can be done. A well designed
>> compiler implements switch using perfect (or near perfect)
>> hashing anyway. Seems though that some compilers still
>> don't.
>
> Another interesting approach could be "adaptive switch" as explained here:
>
> http://osdir.com/ml/parsers.spirit.devel/2006-05/msg00025.html
>
> (a self-optimizing alternative parser). Maybe it can be combined with
> hashing techniques.

Yeah, it's a very interesting idea!

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk