MATLAB: Element-wise raise an array to an integer power

element-wise powerinteger exponent

Hi everybody,
I found that the element-wise multiplication of a large array (a.*a.*a) is much faster than the equivalent element-wise power function (a.^3). It seems that the only exception is squaring:
>> a = rand(300,300,300);
>> tic,a.^2;toc
Elapsed time is 0.125585 seconds.
>> tic,a.^3;toc
Elapsed time is 2.304034 seconds.
>> tic,a.^12;toc
Elapsed time is 2.328101 seconds.
while:
>> tic,a.*a;toc
Elapsed time is 0.147440 seconds.
>> tic,a.*a.*a;toc
Elapsed time is 0.214431 seconds.
>> tic,(a.*a.*a).^2.^2;toc
Elapsed time is 0.505067 seconds.
Is there an alternative Matlab element-wise power function which factorizes integer exponents and performs element-wise multiplications instead of exponentiations, whenever preferable?
Thanks a lot
Bernhard