官术网_书友最值得收藏!

Behind the scenes

A critical part of writing fast code is to understand what happens behind the scenes. Are you appending strings? You should know how that is implemented in a compiler. Passing a dynamic array into a function? Ditto. Wondering whether you should create 10,000 instances of a class or just create a large array of records? Knowing the implementation details will give you the answer.

In this section, I'll dig down into some frequently used data types and show how using them will bring in unexpected complexity. I will discuss memory and memory allocation, but I will treat them as very abstract entities. I'll say words like "A new string gets allocated" with which I'll mean that a secret part of code, called memory manager, gets memory from the Windows and tells the program: "You can store your string here." We'll dig deep into the bowels of memory manager in Chapter 4, Memory Management.

主站蜘蛛池模板: 抚顺市| 平定县| 扎鲁特旗| 华宁县| 平邑县| 葵青区| 连平县| 南澳县| 丁青县| 哈巴河县| 根河市| 泰来县| 建瓯市| 杭州市| 宁城县| 辛集市| 涞水县| 阿城市| 印江| 岗巴县| 阳东县| 牡丹江市| 车险| 温泉县| 河西区| 西畴县| 嘉善县| 嘉峪关市| 黄骅市| 白朗县| 连城县| 久治县| 佳木斯市| 云安县| 伊通| 临湘市| 巴彦淖尔市| 涞水县| 高安市| 布尔津县| 西华县|