sysprog21
not-done
louielu
├── clz.c
├── clz.h
├── README.md
└── test_clz.c
clz.h
宣告各個 clz 的 function
clz.c
定義各個 clz function
test_clz.c
各個 clz function 與 clz_debug (__builtin_clz) 做比較。
__builtin_clz
result undefined使用 __builtin_clz
當作 debug clz 但是出錯了!
每次的結果還都不一樣咧
用 gdb 看是正常的
最後發現…
— Built-in Function: int __builtin_clz (unsigned int x)
Returns the number of leading 0-bits in x, starting at the most significant bit position. If x is 0, the result is undefined.
這告訴我們,看 Documentation看 Documentation看 Documentation看 Documentation看 Documentation看 Documentation看 Documentation。
If x is 0, the result is undefined.
這邊使用 function pointer 來傳入每個 clz function,簡化程式碼。
TODO: 比照 Linux 核心的 Crypto API,將 algo 和 data source 區隔 jserv
不太清楚 data source 以及 algo / data source 區隔的意思,是指各個 algo modulize 然後提供 API 來接上去嗎? louielu
travis CI
yerrorlines
可以畫出 confidence interval
每個 algorithm 跑 50 萬次,跑 50 次取 95% 信賴區間資料。