contributed by < EdisonHsien
>
請加快進度!
課程助教
sufuf3
Hello
是表示什麼!!git commit --amend
修正。(ref: https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project)sudo make plot
)。Hash Function
是還未實作嗎?edison@edison-MS-7721:~$ lscpu
Architecture: x86_64
CPU 作業模式: 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
每核心執行緒數:2
每通訊端核心數:2
Socket(s): 1
NUMA 節點: 1
供應商識別號: AuthenticAMD
CPU 家族: 21
型號: 48
Model name: AMD Athlon(tm) X4 860K Quad Core Processor
製程: 1
CPU MHz: 1700.000
CPU max MHz: 3700.0000
CPU min MHz: 1700.0000
BogoMIPS: 7386.21
虛擬: AMD-V
L1d 快取: 16K
L1i 快取: 96K
L2 快取: 2048K
NUMA node0 CPU(s): 0-3
中英文字間請以空白隔開
課程助教
perf stat
比起 top
會做更明確且深入的效能檢測不要寫「還算 OK」,你要具體標出你懂的地方,還有哪些待釐清之處!
理工科技的學生,說話不該含糊 "jserv"
typedef struct __PHONE_BOOK_ENTRY {
char lastName[MAX_LAST_NAME_SIZE];
char firstName[16];
// char email[16];
// char phone[10];
// char cell[10];
// char addr1[16];
// char addr2[16];
// char city[16];
// char state[2];
// char zip[5];
struct __PHONE_BOOK_ENTRY *pNext;
} entry;
可以發現
Performance counter stats for './phonebook_orig' (100 runs):
576,640 cache-misses # 14.484 % of all cache refs ( +- 0.21% ) (75.06%)
3,981,355 cache-references ( +- 0.44% ) (51.25%)
263,944,044 instructions # 0.83 insn per cycle ( +- 0.21% ) (76.13%)
317,224,241 cycles ( +- 0.18% ) (75.53%)
0.081746195 seconds time elapsed
( +- 0.31% )
從 14.484% 下降到 9.718%
Performance counter stats for './phonebook_opt' (100 runs):
195,458 cache-misses # 9.718 % of all cache refs ( +- 0.31% ) (73.47%)
2,011,372 cache-references ( +- 0.64% ) (51.73%)
243,230,170 instructions # 1.04 insn per cycle ( +- 0.22% ) (77.88%)
234,302,473 cycles ( +- 0.29% ) (76.57%)
0.060927358 seconds time elapsed
( +- 0.42% )
unsigned long BKDRHash(char* str)
{
long seed = 131; // 31 131 1313 13131 131313 etc..
long hash = 0;
while (*str){
hash = hash * seed + (*str++);
}
return (hash & 0x7FFFFFFF);
}
/* End Of BKDR Hash Function */