Question: faster maple code random Matrix Rank

** comparison link has been updated for Maple 2015 **  All three M's have identical speed performances

 

Someone has created a comparison of Mathermatica 9, Maple 17 and Matlab 2013a here http://12000.org/my_notes/rankTest/test.htm

The timings and codes used were as follows:

 

2.2.1 Mathematica

Remove["Global‘*"];  
Share[];  
n = 7000;  
m = Table[Random[], {i, 1, n}, {j, 1, n}];  
AbsoluteTiming[MatrixRank[m];]


2.2.2 Maple

restart;  
kernelopts(gcfreq= 2^22):  
UseHardwareFloats:= true:  
gc():  
 
n:=7000:  
 
M:= LinearAlgebra:-RandomMatrix(  
     n  
    ,n  
    ,generator=0.0 .. 1  
    ,outputoptions=[datatype=float[8]]  
):  
 
time[real](LinearAlgebra:-LA_Main:-Rank(M));



2.2.3 Matlab

clear all;  
n=2500;  
A=rand(n,n);  
tic();  
rank(A);  
toc()

Certainly that must be the slowest possible route for Maple ever.  Anyone care to post their code and timings?

Please Wait...