Mar 2, 2008

Min Max problem

There is a discussion in Matlab blog: Should min and max marry?
The question is what the overhead is in calling min and max separately, instead of scanning through the data once, looking for both the lowest and highest values, and is it worth having a combined function for min and max from a speed point of view? It seems worthy it, if you work with large data frequently.

I am not sure about how Mathematica handle Min/Max internally. The one thing I can confirm is that Min/Max operations on large random 1 dimensional array are several times faster than the ones in Matlab in my computer.

No comments: