MATLAB: Do operations on single or int32 data types take longer time than on double data types on a 64 bit machine

3232-bit6464-bitbitdoublemachineMATLABoperationssingleslower

On a 64 bit machine the following code takes more time to run when "a" and "b" are int32 or single(32 bits) than when they are double(64 bits):
a = 4096;
b = 128;
start = cputime;
for i=1:1048576
c = a/b;
end
t = cputime-start;
disp(t);
a = single(4096);
b = single(128);
start = cputime;
for i=1:1048576
c = a/b;
end
t = cputime-start;
disp(t);

Best Answer

It is possible for the 32-bit operations to run at the same speed or a bit slower than the 64-bit operations while working on a 64-bit machine. This is because of the architecture of the processors. One explanation could be that the registers in 64-bit machines are 64-bit wide and are faster in processing 64 bit operations than 32-bit operations.
On the other hand, if the machine is 32-bit the operations on single data types are faster than those on double data types.