Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Analogous to //Timing, I would like to be able to see how many operations my program goes through before producing an output. Does anybody know of a way to do this?

I'm only looking for a rough reference. For instance, if I added two integers, that could be considered as 1 operation. If possible, it would also be nice to know say the number of bitwise operations that were required for that addition.

share|improve this question
7  
For a system as high-level as Mathematica, the general notion of a number of operations largely does not make sense, since some of the operations considered atomic by top-level Mathematica contain thousands of steps in their internal implementation. You can ask how many times some of the functions are called, but you seem to be after something else. –  Leonid Shifrin Jun 25 '13 at 18:07
    
Take a look at this comment by Oleksandr R. to get a related idea concerning question how many times one function was called by another one. –  Artes Jun 25 '13 at 18:20
3  
Totally agree with Leonid. Nevertheless, you could try c = 0; Trace[Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}], e_ /; (c++; True)]; c to get a general impression. –  Silvia Jun 25 '13 at 18:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.