Skip to content

Instantly share code, notes, and snippets.

@lukas2
Created November 18, 2010 21:19
Show Gist options
  • Save lukas2/705642 to your computer and use it in GitHub Desktop.
Save lukas2/705642 to your computer and use it in GitHub Desktop.
send(short *to, short *from, int count)
{
int n=(count+7)/8;
if(count%8 == 0) goto label_case0;
if(count%8 == 1) goto label_case1;
if(count%8 == 2) goto label_case2;
if(count%8 == 3) goto label_case3;
if(count%8 == 4) goto label_case4;
if(count%8 == 5) goto label_case5;
if(count%8 == 6) goto label_case6;
if(count%8 == 7) goto label_case7;
label_case0: do{ *to = *from++;
label_case7: *to = *from++;
label_case6: *to = *from++;
label_case5: *to = *from++;
label_case4: *to = *from++;
label_case3: *to = *from++;
label_case2: *to = *from++;
label_case1: *to = *from++;
}while( --n>0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment