Question: Advice on profiling?

Hello Maple experts, during my studies, I have developed a number of Maple procedures that deal with quantum information/quantum computation. This means I use excessively the Matrix data structure and the LinearAlgebra package. Given the fact that I'm not the most talented programmer in general and also that I had no experience with Maple before, I have now a Maple package that is sometimes really slow. Especially when working numerically, I'm often jealous about the performance I could have achieved with Matlab. This is although I already try to use Digits=14 (which should, in principle, enable hardware floating point operations). However, procedures involving Matrix objects are mostly not supported by evalhf (and cannot be compiled, right?). In order to improve that I want to do a profiling. One way of doing that is using kernelopts(profile=true); writeto('output'); ...some computations... kernelopts(profile=false); writeto(terminal); exprofile('output',rload); This yields: name #calls cpu words ==== ====== === ===== Main_Routine 1 319.483 ( 77.3%) 1821535083 ( 81.3%) unknown 220343 26.000 ( 6.3%) 117077166 ( 5.2%) . . . Unfortunately, the result isn't very helpful (to me) because the two by far biggest contributors in the list are "Main_Routine" and "unknown". It seems that this way of profiling won't tell me reliably which of my procedures used up which resources (although later in the list some of my procedures appear...). I know that I can do a more detailed profiling of a single procedure using the CodeTools[Profiling] package. But I also wanted to have a "big picture". So can someone give general advice how to profile and speed up (complex) matrix computations or is the only way out calling external compiled code? Any help is appreciated as I'm pretty sure that Maple can do better than in my current implementations. But this way, it is not so easy to indetify the bottlenecks. Thanks in advance!
Please Wait...