Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
|||
Line 19:
Roger Sayle gives an example<ref>{{cite journal|last1=Sayle|first1=Roger Anthony|title=A Superoptimizer Analysis of Multiway Branch Code Generation|journal=Proceedings of the GCC Developers' Summit|date=June 17, 2008|pages=103–116|url=https://www.nextmovesoftware.com/technology/SwitchOptimization.pdf|accessdate=26 November 2015}}</ref> of eliminating a [[multiway branch]] caused by a [[switch statement]]:
<
inline bool HasOnly30Days(int m)
{
Line 32:
}
}
</syntaxhighlight>
Which can be replaced with a table lookup:
<
inline bool HasOnly30Days(int m)
{
Line 42:
return T[m-1];
}
</syntaxhighlight>
==See also==
|