Content deleted Content added
Line 18:
This example<ref>[http://ols.fedoraproject.org/GCC/Reprints-2008/sayle-reprint.pdf "A Superoptimizer Analysis of Multiway Branch Code Generation"] by Roger Anthony Sayle</ref> of a C function – returning TRUE if a month (x) contains 30 days (otherwise FALSE), illustrates the concept succinctly
<source lang="c">
if (((unsigned)x > 12)
static const int T[12] ={0,0,0,1,0,1,0,0,1,0,1,0}; /* 0-based table 'if 30 days =1,else 0' */
return T[x - 1]; /* return with boolean 1 = true, 0=false */
</source>
|