[Home Page] - [Reviews Main] | |
|
Writing Efficient Programs by Jon Bentley Highly Recommended |
| ISBN: 0-13-970244-X Publisher: Prentice Hall Pages: 170pages Price: £17-85 |
| Categories: writing solid code advanced c |
| Reviewed by Jon Jagger in C Vu 7-5 (Jul 1995) |
Question. How can you speed this up?
To link to this review, please use the URL:
http://www.accu.org/bookreviews/public/reviews/w/w001428.htm for (i = 0; i < N; i++)
x[i] = x[i] * exp(sqrt(PI/2));
Answer...
factor = exp(sqrt(PI/2));
for (i = 0; i < N; i++)
x[i] = x[i] * factor;
Old hat to most of you no doubt. Its called 'CISBN ding motion out of
loops.' How many of you are aware that the technique can actually increase
the run-time though? Think about N == 0. The book is full of insights like
that. I've heard that new recruits at Microsoft are not allowed to start
coding until they have read a required reading list of 10 books. I'd put
money on this being on the list. Get it. Read it.
Other
Authors with the same surname
Bentley
More Programming Pearls, Confessions of a Coder by Jon Bentley [Highly Recommended] (Reviewed May 1992)
More Programming Pearls by Jon Bentley [Recommended] (Reviewed May 1996)
Programming Pearls 2nd ed. by Jon Bentley [Highly Recommended] (Reviewed Jan 2000)
Programming Pearls by Jon Bentley [Highly Recommended] (Reviewed May 1995)
Last Update - 13 May 2001.
Mirrored from http://www.accu.org/