Search code examples
memorytimemaple

Measuring execution time and CPU usage for a Maple function


I'm working on writing a larger procedure in Maple and I'm trying to figure out why it running slow. I was thinking that if I could test certain subfunctions in the procedure for their execution time I could determine a better way to code it to make it run faster.

Is there a good way to measure the execution time or cpu use for a Maple function?


Solution

  • To see the resource usage for an entire procedure, run it wrapped in CodeTools:-Usage. To see a line-by-line analysis of resource usage, use CodeTools:-Profiling:-Profile.