Question: A question about the efficiency of ready-made procedures

When I have an operation to perform with Maple, my first reflex is to use the "native" Maple procedure(s) because it seems logical to think that they have been written in order to reduce the memory used and/or the execution time.
Unfortunately, this feeling is not confirmed by reading some of the answers provided on this site.

The attached file shows 4 ways (among probably several others) to center and reduce (by columns) a random matrix.
Amid them is the Statistics:-Scale procedure which appears not to be the most efficient (even a double loop outperforms in term of time).
This is just an example among many others (for instance Statistics:-Select can be easily outperformed)

So my question: why deceive the user with magic functions which sometimes have a very relative efficiency?

Scaling_efficiency.mw

Please Wait...