开发者

What are some good resources for learning algorithm optimization?

开发者 https://www.devze.com 2023-04-07 19:59 出处:网络
I\'ve been tinkering around with code (Basic, Python, C++, PHP, JavaScript) on and off for almost two decades, but have only recently begun to开发者_StackOverflow get more \"serious\" about it (using

I've been tinkering around with code (Basic, Python, C++, PHP, JavaScript) on and off for almost two decades, but have only recently begun to开发者_StackOverflow get more "serious" about it (using Java). I can write code to do what I want, but now I want to learn to optimize my programs to run faster (looping through an array for every element in an array can get slow very quickly, etc). What I don't want is to be popping onto this site every 5 minutes for every little question I have. I want to learn to answer my own questions.

That said, what are some good resources for learning algorithm analysis and optimization?

I have a copy of Data Structures and Algorithms in Java (3rd edition) but I feel it's written to mostly be incorporated into a college curriculum and isn't very easy to use sans-professor. The book also has a tendency to over-use abbreviations, making it hard to flip to a particular chapter without having to skim back through the book to understand what each abbreviation stands for.

I do have some knowledge of Calculus, but it's extremely rusty, so I would prefer resources that give more explanation and fewer formulas.

Thank you in advance for all the help you can give!


I can't recommend enough Michael Abrash's "The Zen of Code Optimization". It's easyto read and full of insights. The parts that focus on pre-pentium x86 are dated, but it's real value is the focus on how to think about making code faster.

I believe it's out of print, but you may find a used copy online.


You might start with Skiena's Algorithm Design Manual. The same author also has a book on puzzle-solving called Programming Challenges, which gives you a more entertaining way to get practice with algorithms than slogging through a textbook.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号