Benchmarking Dell Precision T7500

Using the script below, I compared my new Dual X5675 PC (which only cost £588 in December 2016) with my i7 4710MQ laptop

Dual X5675 has a PassMark of 12,818
4710mq has a PassMark of 7,984
i
7 6700k has a Passmark of 11,085

So the Dual X5675 should beat the i7 6700k (though probably only on multi-processing tasks), and at current times the system is half the price.

Though a modern i7 system would probably have atleast a GTX 1050 graphics card, which as over twice as fast as the Quadro 4000 (http://gpu.userbenchmark.com/Compare/Nvidia-Quadro-4000-vs-Nvidia-GTX-1050/m7693vs3650)

But the Quadro 4000 should be about 20% faster than the GeForce 840M in my laptop (http://gpu.userbenchmark.com/Compare/Nvidia-Quadro-4000-vs-Nvidia-GeForce-840M/m7693vsm8643), which cost around £600 1.5 years ago, so was probably a bargain too!

The X5675 was about 50% slower when using a single thread, but took about 43% of the time of the i7 4710MQ when using multiple threads.

Looking at http://cpuboss.com/cpus/Intel-Xeon-X5675-vs-Intel-Core-i7-4710HQ, the i7 should have better single core performance (8.6 vs 7.2), though the Passmark score is higher (8,620 vs 7,976) for the X5675. Note that the Passmark score is only for a single X5675, which has a Passmark of 12,827 in a twin CPU configuration.

#!/usr/bin/env python
from __future__ import print_function, division, absolute_import

import math
import threading
from timeit import repeat

import numpy as np
from numba import jit

nthreads = 4
size = 1e7

def func_np(a, b):
“””
Control function using Numpy.
“””
return np.exp(2.1 * a + 3.2 * b)

@jit(‘void(double[:], double[:], double[:])’, nopython=True, nogil=True)
def inner_func_nb(result, a, b):
“””
Function under test.
“””
for i in range(len(result)):
result[i] = math.exp(2.1 * a[i] + 3.2 * b[i])

def timefunc(correct, s, func, *args, **kwargs):
“””
Benchmark *func* and print out its runtime.
“””
print(s.ljust(20), end=” “)
# Make sure the function is compiled before we start the benchmark
res = func(*args, **kwargs)
if correct is not None:
assert np.allclose(res, correct), (res, correct)
# time it
print(‘{:>5.0f} ms’.format(min(repeat(lambda: func(*args, **kwargs),
number=5, repeat=2)) * 1000))
return res

def make_singlethread(inner_func):
“””
Run the given function inside a single thread.
“””
def func(*args):
length = len(args[0])
result = np.empty(length, dtype=np.float64)
inner_func(result, *args)
return result
return func

def make_multithread(inner_func, numthreads):
“””
Run the given function inside *numthreads* threads, splitting its
arguments into equal-sized chunks.
“””
def func_mt(*args):
length = len(args[0])
result = np.empty(length, dtype=np.float64)
args = (result,) + args
chunklen = (length + numthreads – 1) // numthreads
# Create argument tuples for each input chunk
chunks = [[arg[i * chunklen:(i + 1) * chunklen] for arg in args]
for i in range(numthreads)]
# Spawn one thread per chunk
threads = [threading.Thread(target=inner_func, args=chunk)
for chunk in chunks]
for thread in threads:
thread.start()
for thread in threads:
thread.join()
return result
return func_mt
func_nb = make_singlethread(inner_func_nb)
func_nb_mt = make_multithread(inner_func_nb, nthreads)

a = np.random.rand(size)
b = np.random.rand(size)

correct = timefunc(None, “numpy (1 thread)”, func_np, a, b)
#timefunc(correct, “numba (1 thread)”, func_nb, a, b)

for nthreads in range(1, 24):
func_nb_mt = make_multithread(inner_func_nb, nthreads)
timefunc(correct, “numba (%d threads)” % nthreads, func_nb_mt, a, b)

About quantitativenotes

About Me
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment