Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Print the timing and memory used to evaluate an expression
ResourceFunction["EchoPerformance"][expr] prints the absolute number of seconds and memory in bytes used to evaluate expr and returns expr. | |
ResourceFunction["EchoPerformance"][expr,label] prepends label to a printed expression. |
Evaluate an expression and print the time it took and the memory used:
In[1]:= |
Out[1]= |
Use a custom label to print performance data:
In[2]:= |
Out[2]= |
AbsoluteTiming gives the time it takes to evaluate an expression:
In[3]:= |
Out[3]= |
MaxMemoryUsed gives the maximum number of bytes used in evaluating an expression:
In[4]:= |
Out[4]= |
EchoPerformance prints the same performance data:
In[5]:= |
Out[5]= |
This work is licensed under a Creative Commons Attribution 4.0 International License