3 ms·
The benchmarks https://github.com/ncm/computed-goto/blob/master/benchmarks/trivial.cpp https://github.com/ncm/computed-goto/blob/master/benchmarks/... benchmark
by krizhanovsky 6y ago
The benchmarks https://github.com/ncm/computed-goto/blob/master/benchmarks/trivial.cpp https://github.com/ncm/computed-goto/blob/master/benchmarks/... benchmark is not applicable to this discussion because it compares _too_ small state machines. I reference my talk and presentation once more: http://www.tempesta-tech.com/research/http_str.pdf http://www.tempesta-tech.com/research/http_str.pdf - slide 23 discusses that the goto FSM makes sense for _hundreds_ of states.
- ncmncm 6y agoThe number of states is irrelevant. An optimized tail call is achieved with, exactly, a single branch instruction.