Quantcast
Viewing all articles
Browse latest Browse all 11560

Re: Display Calculation Time, How?

Oops! Don't know why I thought time() would not be available in Prime. I should have known better as I now remember vagely an older thread where I implemented some timing routines for someone dealing with rather huge matrices in Prime (probably 2.0 at that time) and it showed that Prime was quite slower in execution than MC15 - at least without multithreading. It was also shown that built-in commands like stack and augment are much(!) slower than self written routines using loops (this applies to both Prime and real Mathcad).

And yes, timing in Mathcad isn't quite accurate but at least it can show a tendency.

I am not sure if we get a better accuracy by placing the loop differently. Anyway, the first try was a bit surprising:

Image may be NSFW.
Clik here to view.
22.04.png

What we see here seems to be that the overhead caused by the loop counter incrementing (in timer1()) is much smaller than the overhead caused by the call to time() and the subsequent assignment to tsum (in timer2()).


Viewing all articles
Browse latest Browse all 11560

Trending Articles