手邊最近剛好進來了一台i7搭配6G的PC,雖然裝了ubuntu 64bit-server的OS,但是我們的應用程式很多都還是32位元的,而且很好奇到底是64bit的application快,還是32bit的application快,於是我分別將unixbench編譯成32-bit和64-bit進行測試。
結果發現,即便是在64bit的OS下執行程式,32bit的效能不見得比64bit來的差,不是單純的將OS和硬體升級成64位元,電腦就會變快了,應用程式有沒有對64做最佳化也是非常重要的關鍵。
在讀寫方面,64位元小勝32位元。圖表為讀寫10sec所讀寫到的資料量,file system為ext3。
在一些演算法的運算下,各有小勝的項目。
在process的處理上,32bit勝出。
至於system call和pipe則64bit勝出。
檔案複製上,32bit勝出。(這點感覺還挺那悶的)
數值運算上,64bit小勝。
所有數據資料
64-bit | 32-bit | ||
Dhrystone 2 without register variables | 22989948.3 | 15872890.4 | lps |
Dhrystone 2 using register variables | 23031345.5 | 15525587.1 | lps |
Arithmetic Test (type = register) | 3795084.9 | 3800669.2 | lps |
Arithmetic Test (type = short) | 3792994 | 3475120.4 | lps |
Arithmetic Test (type = int) | 3798887.6 | 3795243.4 | lps |
Arithmetic Test (type = long) | 1361641.8 | 3797989.6 | lps |
Arithmetic Test (type = float) | 2999814.7 | 1755172.6 | lps |
Arithmetic Test (type = double) | 1908910.6 | 1755790.4 | lps |
System Call Overhead Test | 5310434.8 | 4194268.7 | lps |
Pipe Throughput Test | 2713396.7 | 2364773.8 | lps |
Pipe-based Context Switching Test | N/A | 421790.3 | |
Process Creation Test | 13766.1 | 14274.1 | lps |
Execl Throughput Test | 4028.2 | 4128.9 | lps |
File Read (10 seconds) | 8619286 | 7545589 | KBps |
File Write (10 seconds) | 1519095 | 1453324 | KBps |
File Copy (10 seconds) | 79768 | 91090 | KBps |
File Write (30 seconds) | 1515752 | N/A | KBps |
File Copy (30 seconds) | 89420 | N/A | KBps |
C Compiler Test | 1826.8 | 1863 | lpm |
Shell scripts (1 concurrent) | 8495.3 | 15928.3 | lpm |
Shell scripts (2 concurrent) | 6293.3 | 12343.3 | lpm |
Shell scripts (4 concurrent) | 4276.7 | 7584.6 | lpm |
Shell scripts (8 concurrent) | 2818 | 5387 | lpm |
Dc: sqrt(2) to 99 decimal places | 593737.4 | 625083.3 | lpm |
Recursion Test--Tower of Hanoi | 244750.3 | 168275.4 | lps |
Arithmetic Test (type = double) | 751 | 690.8 | |
Dhrystone 2 without register variables | 1027.9 | 709.7 | |
Execl Throughput Test | 244.1 | 250.2 | |
File Copy (30 seconds) | 499.6 | N/A | |
Pipe-based Context Switching Test | 0 | 319.9 | |
Shell scripts (8 concurrent) | 704.5 | 1346.8 |
http://www.tux.org/pub/tux/benchmarks/System/unixbench
沒有留言:
張貼留言