Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Elegance vs. Performance

Name: Anonymous 2011-05-27 4:11

So /prog/, what would you choose between these two snippets of C code...


int *arr[3];
arr[0] = 1;
arr[1] = 2;
arr[2] = 3;


or...


int i;
int *arr[3];
for (i = 0; i < 3; i++)
  arr[i] = i+1;


The second one is more elegant, but requires more operations.

Name: Anonymous 2011-05-27 13:45

>>24
the OPs C code would compile and run on a SPARC, ALPHA, and, the x86. Whereas the assembler code wouldn't.
Everybody knows that, again, stating the obvious will only make you seem even less intelligent.

We are having the discussion since the optimal C solution has already been posted. Since you are the one lashing out whenever someone doesn't do what you want you are the one that's likely to be autistic. You should be able to abstract the x86 specific examples into more general assembly code, this is the mark of an intelligent person, since you are unable to do so you must be unintelligent, since this infuriates you, you must be socially unintelligent.

>>25
Your opinion is inconsequential, this is fortified by the fact that you are unintelligent. You simply don't matter. You are without value. Nobody cares about your opinion. I'm sure even you will be able to properly interpret one of the sentences above properly, and perhaps realize a thing or two about yourself.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List