HP Forums
Proof of concept: how to profile poor performing programs - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Proof of concept: how to profile poor performing programs (/thread-4866.html)



Proof of concept: how to profile poor performing programs - eried - 10-03-2015 07:10 PM

Hello, this is a little draft of a guide to analyze hp prime apps based on performance.

I am going to use an early version of the game Radioactive Wastes http://www.hpmuseum.org/forum/thread-4840.html by komame.

First my idea is to put the profiling information in the terminal (I noticed that the terminal is limited, so this will be a problem but it is OK as a general information about the method). I am going to use the comments:

[Image: 10.03.2015-15.54.png]

A simple regex should do the job. Now we run the modified app and copy the results to Excel or something similar:
[Image: 2015-10-03_1556.png]

The final column will just be the difference between events. Of course for a serious analysis is you need to define these in a much better way in your code, at the start of a function, or a loop you want to analyze.

Now I added a main category (I identified these after capturing some data) and then we use a pivot table/chart:
[Image: 2015-10-03_1600.png]

And finally we can see all the times each section took, averages, etc:
[Image: 10.03.2015-16.01.png]

[Image: 10.03.2015-16.01.png]

[Image: 10.03.2015-16.01.png]

Or more fancier ways to see the time impacts of the code segments:
[Image: 2015-10-03_1608.png]

[Image: 2015-10-03_1608.png]

[Image: 2015-10-03_1612.png]

(these last graphs are from Excel 2016)


RE: Proof of concept: how to profile poor performing programs - komame - 10-03-2015 07:31 PM

Amazing, I'm really impressed!