Example Here we have the so called next permutation algorithm,implemented in the Critticall's C language: Reference: E.W.Dijkstra, A Discipline of Programming, Prentice-Hall, 1976 ``` \$DECLAREINT i i1 one element1 size j ii element2 i2 \$DIMENSION small[6] test[6] \$MINIMIZE LINES 40 \$WEIGHTS COMMANDS=0 LINES=1 // A message to Critticall, that only lines count. // That this source should be minimized for lines. \$RETVAR small[] // Must include this file here before any optimization can take place!!! one=1; i=size-one; ii=i-one; element1=small[ii]; element2=small[i]; while (element1 >= element2) { i--; ii=i-one; element1=small[ii]; element2=small[i]; } j=size; ii=j-one; element1=small[ii]; ii=i-one; element2=small[ii]; while (element1 <= element2) { j--; ii=j-one; element1=small[ii]; ii=i-one; element2=small[ii]; } i1=i-one; element1=small[i1]; i2=j-one; element2=small[i2]; small[i1] = element2; small[i2] = element1; i++; j=size; while (i < j) { i1=i-one; element1=small[i1]; i2=j-one; element2=small[i2]; small[i1] = element2; small[i2] = element1; i++; j--; } ``` From 41 lines at the beginning, we have something less then 2/3 of that number bellow. And it's already faster. Now we are going to subject the result  to the default Critticall's optimization. Regardless of how many lines, but as less instructions as possible. ``` // The algorithm has been enhanced for 36.5854% \$DECLAREINT one i size element1 j i2 critticall3 \$DIMENSION small[6] test[6] \$MINIMIZE LINES 41\$RETVAR small[] // Must include this file here before any optimization can take place!!! \$BES i=size; while (element1>=critticall3) { i+=-1; one=1; critticall3=small[i]; i2=i-one; element1=small[i2]; j=size; } while (icritticall3) { critticall3=critticall1; j=size; i2+=-1; critticall1=small[i2]; critticall4+=-1; } critticall3=critticall1; critticall1=small[size]; while (critticall4