Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
2Activity
×
0 of .
Results for:
No results containing your search query
P. 1
O'Connor -- Matrix Benchmarks

O'Connor -- Matrix Benchmarks

Ratings: (0)|Views: 507|Likes:
Published by Derek O'Connor
A short report on benchmarking Matrix Decompositions using R and Matlab on a Dell Precision 690 and a Lenovo X220
A short report on benchmarking Matrix Decompositions using R and Matlab on a Dell Precision 690 and a Lenovo X220

More info:

Published by: Derek O'Connor on Jan 16, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

12/26/2012

pdf

text

original

 
Benchmarking M
ATLAB
and R
on a
ThinkPad X200 and a Precision 690
Derek O’ConnorFebruary 19, 2012
*
1 Matrix Benchmark Tests
This is a brief report on the results of a set of very simple benchmarks performed on avarietyofnumericalsystems. Thesetestsarenotmeanttobedefinitive,exhaustive,etc.They do nothing more than test the standard matrix functions on a single 1000
×
1000matrix
A
generated by the equivalent of the M
ATLAB
statement
A = rand(1000,1000)
.The M
ATLAB
and R code is in the Appendix3.2.Each of these numerical software systems is based on the matrix data type or has thematrix data type as a prominent feature. If such a system does not perform well on thestandard matrix functions then something is wrong.
Benchmark Hardware
The machines and operating systems used in these tests is a one-week-oldLenovo ThinkPad X220, Intel Core i7-2640M CPU @ 2.80GHz, 8GB ram1 Processor, 2 Cores and 4 ThreadsWindows 7 Professional, 64-bitAlthough the clock rate of the CPU is 2.8GHz, Intel’s
Turbo Boost
can increase this to3.5GHz when it deems it necessary. It is not clear (yet) how Turbo Boost affects these benchmarks because there appears to be no way (yet) to turn it on or off within thenumerical systems tested.Most systems such as M
ATLAB
have, over time, decreased the amount of control theuser has over hardware and low-level program settings. This is a good idea in general but frustrates the amateur benchmarker.
*
Started: 30 Dec 2011. web:
http://www.derekroconnor.net 
email :
derekroconnor@eircom.net 
1
 
Derek OConnor Benchmarking R and M
ATLAB
˙The second machine is is a 4 year-oldDell Precision 690, 2 x Intel Xeon E53405 CPU @ 2.33GHz, 16GB ram2 Processors, 8 Cores and 8 ThreadsWindows 7 Professional, 64-bit
Benchmark Software
Three numerical software systems were used, all under Windows 7 64-bit:1. M
ATLAB
7.13 (R2011b)2. R version 2.14.1 (2011-12-22), Platform: x86 64-pc-mingw32/x64 (64-bit)3. R
EVOLUTION
R E
NTERPRISE FOR
W
INDOWS
, R version 2.13.2 (2011-09-30), Plat-form: x86 64-pc-mingw32The version of Intel Math Kernel used by M
ATLAB
and Revolution R is not known but is presumed to be less than a year out of date. The M
ATLAB
and R code is in theAppendix3.2.
2 Benchmark Results
I have tested Matrix Decompositions only. These are the foundations on which allother matrix algorithms are built, and if these are shaky then all other algorithms will be shaky too. These changes will, I hope, make the results more useful.
Table 1.
B
ENCHMARK
T
IMES FOR ALL
S
YSTEMS
(
SECS
)
Machine System (64-bit) A*A chol(A) LU QR SVD Eig Total N. TotR2.14.1 0.773 0.162 0.208 0.566 3.68 6.09 11.47 8ThinkPad X220 Revol R 2.13.2 0.121 0.029 0.062 0.411 1.62 3.27 5.51 4M
ATLAB
R2011b 0.061 0.014 0.033 0.056 0.34 0.96 1.47 1R2.14.1 0.904 0.157 0.260 0.568 4.26 6.97 13.11 5Precision 690 Revol R 2.13.2 0.363 0.112 0.206 1.066 5.45 15.38 22.57 9M
ATLAB
R2011b 0.054 0.017 0.070 0.050 0.34 2.02 2.54 1Averaged over 20 runs with
n = 1000; A = rand(n,n);
© D
EREK
O’C
ONNOR
, F
EBRUARY
19, 2012
2
 
Derek OConnor 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.
1
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

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->