Performance of RevMedia on matrix diagonalization

viktoras d. viktoras at
Thu Aug 27 15:30:32 EDT 2009

Hi Piero,

declaring local/global variables in functions and handlers should 
slightly add to speed. Populating arrays in advance with zeros so that 
array size won't change inside loops might also be of some value. 
However, please correct me if I am wrong, VB6 is compiled while 
Revolution is interpreted, therefore much slower. Did you try 
implementing same algorithm in other interpreted languages (javascript, 
php, perl, etc?) it would be interesting to do some benchmarking :-)

Using native functions: matrixMultiply(firstArray, secondArray), 
transpose(array) where possible would also increase speed as they are 
really fast.

Best wishes

Piero Ugliengo wrote:
> I am completely new to Revolution. I have downloaded the RevMedia alpha
> version and played a bit with it. I was impressed by how fast I was able to
> port a little VB6 code to RevMedia. This code diagonalizes a symmetric
> matrix using the Jacobi algorithm. I checked against the VB6 code and I got
> exactly the same results in the same number of iterations so that numerics
> is the same. However the RevMedia code is at least one order of magnitude
> slower than the VB6 one. For instance a 50x50 matrix is diagonalized in a
> couple of seconds in VB6 and it tooks more than a minute on RevMedia. I know
> that RevMedia is not meant for numerical intensive calculations; however, I
> would like to use it in a scientific teaching context so some power is
> needed. I wonder if anybody much expert than me can try the code using the
> most powerful Revolution Studio and if there is a clever way to deal with
> matrix algebra.
> The link to download the rev script is here:
> <>One
> can set the size of the matrix in the onmouse routine.
> Thanks a lot
> _________________
> Piero Ugliengo

More information about the Use-livecode mailing list