0% found this document useful (0 votes)
61 views4 pages

Matlab 64-Bit vs. Matlab 32-Bit: G.Tec Medical Engineering Gmbh/Guger Technologies Og, Graz, Austria

64-bit addressing allows for much larger memory. 64-bit machine can theoretically handle many arrays of this size. A 64-bit array that can be created can contain 2 48 -1 = 2.8147e14 elements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views4 pages

Matlab 64-Bit vs. Matlab 32-Bit: G.Tec Medical Engineering Gmbh/Guger Technologies Og, Graz, Austria

64-bit addressing allows for much larger memory. 64-bit machine can theoretically handle many arrays of this size. A 64-bit array that can be created can contain 2 48 -1 = 2.8147e14 elements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Matlab 64-bit vs.

Matlab 32-bit



g.tec medical engineering GmbH/Guger Technologies OG, Graz, Austria






1 Introduction
This brief document summarizes the advantages of using a MATLAB

64-bit version against using a


MATLAB

32-bit version in general. The document also refers to the official support homepage of
MathWorks

.

2 General aspects
Generally 64-bit addressing allows for much larger memory. As explained in our Memory
Management Guide technical note (http://www.mathworks.com/support/tech-notes/1100/1106.html),
memory on a 32-bit machine is limited to 2
32
bytes (i.e. 4GB):
On a 64-bit machine this number is increased to 2
64
(i.e. an increase by a factor of 4 billion). Of course,
most machines in use today will run out of physical resources (RAM and virtual memory) long before
they begin to approach the theoretical 2
64
-byte limit.
There is an internal limit of 2
31
elements per array in MATLAB. Up to MATLAB 7.2 (R2006a) this
limit applies regardless of the platform. A 2
31
element double array would require 16 GB of space, thus
making it impossible to create such an array on a 32-bit machine. A 64-bit machine can theoretically
handle many arrays of this size, provided that there is enough RAM and hard disk space to store all the
data.
Beginning with MATLAB 7.3 (R2006b), the largest array that can be created can contain 2
48
-1 =
2.8147e14 elements.
Remark: Note that changing from 32-bit to 64-bit MATLAB only allows for the creation and
manipulation of larger variables but does not imply a boost in execution speed.


Page 2 of 4

3 MATLAB

64-bit vs. MATLAB



32-bit performance test
In the following we did several tests for comparing the performance of a 32-bit MATLAB

version
and a 64-bit MATLAB

version both running on the following test systems:


System 1:
o CPU: Intel

Core
TM
2 Quad CPU Q9500 2.83GHz
o RAM: 8.00GB (usable @32-bit version: 3.44GB)
o OS: Windows7 Professional 32-bit
o MATLAB

: 7.9.0.529 (R2009b) 32-bit



System 2:
o CPU: Intel

Core
TM
2 Quad CPU Q9500 2.83GHz
o RAM: 8.00GB (usable @64-bit version: 7.87GB)
o OS: Windows7 Professional 64-bit
o MATLAB

: 7.9.0.529 (R2009b) 64-bit


The MATLAB

command memory, which gives information about the available memory and the
memory in use inside MATLAB

results in Table 1. The MATLAB

command java results in Table


2:

Table 1: memory command comparison table
memory results of system 1 memory results of system 2
Maximum possible array 1300MB (1.363e+09 bytes) 14571MB (1.528e+10 bytes)
Memory available for all arrays 1466MB (1.545e+09 bytes) 14571MB (1.528e+10 bytes)
Memory used by MATLAB 279MB (2.922e+08 bytes) 426MB (4.469e+08 bytes)
Physical Memory (RAM) 3519MB (3.690e+09 bytes) 8063MB (8.455e+09 bytes)

Table 2: memory command comparison table
version of system 1 version of system 2
-java version Java 1.6.0_04-b04 with Sun
Microsystems Inc. Java
HotSpot Client VM mixed
mode
Java 1.6.0_04-b04 with Sun
Microsystems Inc. Java
HotSpot 64-bit Server VM
mixed mode

With both systems the following matrix operations with different matrix sizes were performed.
Calculation of ones matrices of different sizes
Calculation of matrices of different sizes with randomized content
Save and load of matrices with different size
The results are summarized in Table 3.


Page 3 of 4
Table 3: comparison of matrix operations
Operation/Matrix-size Time Note
System 1 System 2
ones() - command
y=ones(12560,12560) 1s 1s 12560*12560*8=1.28GB
y=ones(17889,17889) Out of memory 1.3s 2.56GB
y=ones(25299,25299) 2.5s 5.12GB
y=ones(35777,35777) 45s 1min 10.24GB
y=ones(42573,42573) >15min 14.5GB
y=ones(50596,50596) Out of memory 20.48GB
rand() - command
y = rand(6325,6325) <1s <1s
y = rand(8945, 8945) 1.5s 1.3s
y = rand(12650, 12650) 2.7s 2.5s
y = rand(17889, 17889) Out of memory 5.1s
y = rand(25299, 25299) 9.7s
y = rand(35777, 35777) 70.0s
y = rand(50596, 50596) Out of memory
save test (with ones() command generated matrix: y=ones(row,column); save matrix.mat y;)
[2240x2240] <1s <1s File 20kB; Matrix: 40MB
[3165x3165] <1s <1s File 36kB; Matrix: 80MB
[4473x4473] 1.1s <1s File 72kB; Matrix: 160MB
[6325x6325] 2s 1.1s File 140kB; Matrix: 320MB
[8945x8945] 3.9s 2s File 280kB; Matrix: 640MB
[12650x12650] 7.5s 4s File 556kB; Matrix: 1280MB
[17889x17889] File 1.7MB; Matrix: 2.56GB
[25299x25299] File 9.97MB; Matrix: 5.12GB
[35777x35777] File 76.9MB; Matrix: 10.24GB
load test (with ones()-command generated matrix: load matrix.mat)
[2240x2240] <1s <1s
[3165x3165] <1s <1s
[4473x4473] <1s <1s
[6325x6325] <1s <1s
[8945x8945] <1s <1s
[12650x12650] 1.3s 1.2s
[17889x17889] 6.2s
[25299x25299] 15.2s

Page 4 of 4
[35777x35777] 170s
save test (with rand() command generated matrices)
[2240x2240] 2s 1.7s File-size: 36.2MB
[3165x3165] 3.6s 3.3s File-size: 72.2MB
[4473x4473] 7,2s 7s File-size: 144MB
[6325x6325] 14s 13.7s File-size: 288MB
[8945x8945] 28.1s 27.6s File-size: 577MB
[12650x12650] 56.5 54s File-size: 1.12GB
[17889x17889] 120s File-size: 2.26GB
[25299x25299] 247s File-size: 4.53GB

load test (with rand() command generated matrices)
[2240x2240] <1s <1s
[3165x3165] 1s <1s
[4473x4473] 1.6s 1.6s
[6325x6325] 3.1s 3s
[8945x8945] 6.1s 6.1s
[12650x12650] 13.8s 12.2s
[17889x17889] 22s
[25299x25299] 65s

scalar multiplication test (matrix generated with rand())
[6325x6325].*2 <1s <1s
[8945x8945].*2 <1s <1s
[12650x12650].*2 Out of memory 1.1s
[17889x17889].*2 2s
[25299x25299].*2 55s
[35777x35777].*2 258s

You might also like