On 23/07/2012 01:35, bearophile wrote:
A discussion appeared few days ago on Reddit, about computed gotos:

http://www.reddit.com/r/programming/comments/wld04/eli_benderskys_website_computed_goto_for/


http://eli.thegreenplace.net/2012/07/12/computed-goto-for-efficient-dispatch-tables/



The presented example is insanely unsafe. By giving invalid input, you can basically branch randomly.

The check added by the switch is what is required to make it safe, so it isn't faster at the end.

The case in the article isn't very strong.

Reply via email to