contributed by<asssde2002
>
vulxj0j8j8
potter903p
$ lscpu
指令顯示1.Original
Performance counter stats for './phonebook_orig' (100 runs):
104,1681 cache-misses # 90.149 % of all cache refs ( +- 0.15% )
115,5509 cache-references ( +- 0.13% )
2,6226,6399 instructions # 1.47 insn per cycle ( +- 0.02% )
1,7837,1341 cycles ( +- 0.25% )
0.058848171 seconds time elapsed ( +- 0.29% )
2.減少size後
Performance counter stats for './phonebook_opt' (100 runs):
12,3273 cache-misses # 30.684 % of all cache refs ( +- 0.75% )
40,1748 cache-references ( +- 0.51% )
2,4446,0697 instructions # 1.97 insn per cycle ( +- 0.02% )
1,2408,4780 cycles ( +- 0.28% )
0.041057655 seconds time elapsed ( +- 0.35% )
發現程式當中只有用到 lastname ,因此把無關的剔除掉後,entry size 從 136 Bytes 減少為 40 Bytes ,cache misses 從 90% 大幅降低至 30% 。
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing