main computation in the for-loop is replaced by the much more specialized code: if(L[0]==1) X=0; if(L[1]==1) X=1; ...
www.seas.upenn.edu