14.1 Go data structures

14.1 Go data structures

Each program is learning 十八般武艺, learning a language, database, HTTP and other skills.

The program 九阳神功is the 数据结构与算master data structures and algorithms, your internal strength practice will be a qualitative leap.

Whether engaged in business development, evaluation of code performance and resource consumption, or architectural design, optimize design patterns, or Fun block chain, we must get the data structures and algorithms.

Once you master data structures and algorithms, the computer will be able to stand 不败之地.

Rob Pike's programming principles

And programmers encourage each other:

  1. You can not conclude that the program will spend the running time in any place. Bottlenecks often occur in unexpected places, so do not worry casually looking for a place to change the code, unless you have confirmed that there is a bottleneck.
  2. Measure. Before the code you do not measure, in particular, did not find that some of the most time-consuming, not to optimize speed.
  3. Fancy algorithm is usually slow in very small n, and n is typically small. The complexity of the great constants fancy algorithms. Unless you are sure n is always great, it does not (even if n is large, but also give priority to the principle 2) with fancy algorithms. For example, solving common problems, the easiest tree - binary tree (binary tree), always complicated than those of trees (AVL trees, splay trees (splay tree) and red-black tree, B- tree (B-tree), multi-tree (trie)) to the university.
  4. Fancy algorithms easier than a simple algorithm bug, more difficult to achieve. Make use of a simple algorithm with a simple data structure. Once you master the four magic data structure, you can conquer the world, they are: array, linked list, hash table, binary tree. This four magic is not fighting each other, combined with the flexibility to ease. For example, a symbol table hash table with the tissue, one of which is constituted by a character array linked list.
  5. Data-centric. If you have chosen the right data structures and everything well organized, the correct algorithm is also not self-evident. The core program is the data structure, rather than algorithms.

1.1 Data structure / Algorithm

How does the site support high-concurrency, throughput at the server how can massive rock solid? Server clustering technology, database optimization, caching technology is designed to be how big God?

Guess you like

Origin www.cnblogs.com/open-yang/p/11256981.html
Recommended