Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Single core cpu performance test

Single core cpu performance.

echo 'int main() { double i = 0; for(i = 0; i < 5000000000; i++) { 20%7 * i; } }' > /tmp/test.c && gcc /tmp/test.c -o /tmp/test && time /tmp/test && rm /tmp/test.c && rm /tmp/test

NOTE: It's not 100% reliable since it differs depending on compiler version.

Platform                   CPU                   Time
MacBookPro15,1 (Mid 2018)  i9 2.4 ghz            11.1 
iMac15,1 (Late 2014)       i7 4.0 ghz            11.7
PC                         i7 4.0 ghz (OC)       12.2 (our CI box)
MacBook Pro (2018)         i7 2.2 ghz            12.3
iMac14,2 (Late 2013)       i7 3.5 ghz            13.0
iMac12,2 (Mid 2011)        i7 3.4 ghz            13.2
MacBook Pro (2017)         i7 3.5 ghz            13.2
PC                         i7 3.2 ghz            13.3 (our CI box)
PC (i5 4690k)              i5 3.5 ghz            13.3
EC2 (c5.2xlarge)           Xeon 8124M 3.0 ghz    13.4
Macbook Pro (Mid 2012)     i7 2.9 ghz            14.2
MacBookPro8,1 (Early 2011) i7 2.7 ghz            14.8
Macmini6,2 (Late 2012)     i7 2.3 ghz            14.9
MacBookAir5,2 (Mid 2012)   i7 2.0 ghz            15.2
MacBookPro11,1 (Late 2013) i7 2.8 ghz            15.3 # Odd result, needs retest, ought to be faster
PC                         i3 3.6 ghz (OC)       15.3
PC                         i3 3.4 ghz (OC)       16.2
Macbook Air (Mid 2011)     i7 1.8 ghz            16.8
PC                         i3 2.9 ghz            18.8
Glesys OpenVZ                                    18.9
Digitalocean droplet       QEMU 2ghz             21.6
EC2 (hi1.4xlarge)                                23.0
Macbook Air (Late 2010)    C2D 2.13 ghz          25.6
EC2 (c1.medium)                                  26.2
MacBook2,1 (~2006-2007)    C2D 1.83 ghz          27.3
Intel Compute Stick        Atom Z3735F 1.33 ghz  31.0
Rasberry Pi 3              1.2ghz                58    # (same time running 4 in parallel, but not 5)
Rasberry Pi 2              0.9ghz                83.7
Rasberry Pi Model B Rev 2  0.7ghz                260.3      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.