Derek O’Connor Benchmarking R and M
ATLAB
˙
Table 2.
N
ORMALIZED
B
ENCHMARK
T
IMES FOR ALL
S
YSTEMS
(
SECS
)
Machine System (64-bit) A*A chol(A) LU QR SVD Eig TotalR2.14.1 1.000 0.210 0.269 0.732 4.76 7.88 14.6ThinkPad X220 Revol R 2.13.2 1.000 0.237 0.515 3.41 13.5 27.1 45.7M
ATLAB
R2011b 1.000 0.260 0.610 0.967 5.77 16.8 25.4R2.14.1 1.000 0.174 0.288 0.628 4.71 7.71 14.5Precision 690 Revol R 2.13.2 1.000 0.308 0.567 2.933 14.99 42.30 62.1M
ATLAB
R2011b 1.000 0.318 1.295 0.925 6.22 37.4 47.1Averaged over 20 runs with
n = 1000; A = rand(n,n);
3 Conclusions
• M
ATLAB
is 4 to 8 times faster than the Rs.• If you need to do a lot of matrix calculations then make sure that your softwaresystemusesthelatestversionofthe
Intel Math Kernel
. Also,itiswelltorememberthat this kernel includes highly optimized
Fast Fourier Transform
code which iscrucial in DSP (Digital Signal Processing).• The most surprising conclusion, for me at least, is economic:
– Price
: A 2012 top-of-the-range super-portable laptop costing
€
1,500 can beata2007top-of-the-rangedesktopcosting
€
9,000. Ifyoudon’tlikesmallscreensand keyboards, then the
€
7,500 difference in price leaves you plenty for adocking station with all the best peripherals.
– Running Costs
: In these days of high-priced ‘sustainable’ electricity (
€
0.20per KWh average over my bills last year), running a powerful desktop PCcan be expensive. At
€
0.20/KWh, running a ThinkPad (65W charger) willcost about
€
20 –
€
30/year; running the Precision 690 (1KW power supply)will cost
€
500 –
€
700/year, about ½ my yearly electricity bill. As the Ameri-cans say,
Go figure!
3.1 Total Cost of Ownership
Likemanysimplebutimportantideas,TotalCostofOwnership(TCO),getsre-inventedevery generation or two.
I never paid much attention to it, dismissing it with “Yes,yes, I know it’s important for corporations who buy 5,000 PCs at-a-time, but it’s not
1
Opportunity Cost
is another simple idea but is much more subtle. Most people cannot grasp it, andeven if they do, they never apply it to themselves. Likewise, the foolishness of basing decisions on
SunkCosts
, escapes the most sophisticated, especially government ministers who have spent
€
40 million onplanning a sports stadium that will never be built.
© D
EREK
O’C
ONNOR
, F
EBRUARY
19, 2012
3