Page 1 of 1

Learning about Performance Programming in C

PostPosted: 14 Jul 2006, 22:36
by Pradu
I've started rewritng my chess engine and I would like to know if anyone can direct me to some good resources on the web or any good books about creating high performance programs in C.

After a good time searching on google for Performance Programming in C, I haven't found anything decisive.

Re: Learning about Performance Programming in C

PostPosted: 15 Jul 2006, 01:25
by Dann Corbit
Pradu wrote:I've started rewritng my chess engine and I would like to know if anyone can direct me to some good resources on the web or any good books about creating high performance programs in C.

After a good time searching on google for Performance Programming in C, I haven't found anything decisive.


Dominatingly, by far, the best way to improve performance is to improve the algorithm. The best way to improve the algorithm is to analyze it for O(f(n)) performance and then improve that metric.

This link is well above average:
http://www.azillionmonkeys.com/qed/optimize.html

Mike Lee has a nice chapter on optimization in the book "C Unleashed". You can probably find a copy at your local library.

Re: Learning about Performance Programming in C

PostPosted: 15 Jul 2006, 01:33
by Dann Corbit
This is pretty good (see also the links at the bottom):
http://en.wikipedia.org/wiki/Software_optimization

Re: Learning about Performance Programming in C

PostPosted: 15 Jul 2006, 16:07
by Pradu
Thanks a bunch!

I see you wrote a section in the C Unleashed book as well. :mrgreen:


Part II - Data Organization
13 Rapid Sorting Techniques (Dann Corbit)

Re: Learning about Performance Programming in C

PostPosted: 16 Jul 2006, 20:11
by Pradu
I've found another great resource if anyone is interested
http://www.amd.com/us-en/assets/content ... /25112.PDF

Re: Learning about Performance Programming in C

PostPosted: 17 Jul 2006, 08:33
by Gerd Isenberg
Yes AMD64-optimization manual is a great ressource.
As well as Agner Fog's updated manuals: http://www.agner.org/optimize/#manuals