简体   繁体   English

什么是学习算法优化的好资源?

[英]What are some good resources for learning algorithm optimization?

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 get more "serious" about it ( using Java ). 近二十年来,我一直在修补代码( 基本,Python,C ++,PHP,JavaScript ),但最近才开始对它更加“认真”( 使用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. 对于我所遇到的每一个小问题,我不想每隔5分钟弹出一次这个网站。 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. 我有一份Java中数据结构和算法 (第3版)的副本,但我觉得它的编写主要是被纳入大学课程中,并且不太容易使用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! 提前感谢您提供的所有帮助!

You might start with Skiena's Algorithm Design Manual . 您可以从Skiena的算法设计手册开始 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. 同一位作者还有一本关于拼图解决的书,名为“ 编程挑战” ,它为您提供了一种更有趣的方法来练习算法,而不是通过教科书。

I can't recommend enough Michael Abrash's "The Zen of Code Optimization". 我不能推荐足够的Michael Abrash的“The Code 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. 专注于pre-pentium x86的部分已经过时,但它的真正价值在于如何考虑如何更快地编写代码。

I believe it's out of print, but you may find a used copy online. 我相信它已绝版,但你可能会在网上找到一份二手书。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM