At one point, I had started creating a list of how many frames it takes to get each powerup. Then I started killing all the bosses with different combinations of lightning levels and pets, and recording how long each takes. In the earlier levels, it's faster to just go to the boss and skip all of the powerups entirely, but this soon changes when the bosses get more and more HP. Considering the high HP value of the robot boss and his stupid pattern, it's most likely fastest to get every lightning upgrade up to him. I never figured out the best thing for the pets though.
Also, RAM addresses I was watching:
00FFFFC0, yposition
00FF0468, xposition
00FFB31C, HP
00FFB41C, HP
00FFB19C, HP
00FFB29C, HP
00FFB21C, HP
00FFB09C, HP
00FFB11C, HP
They are all 2 bytes, signed.
The HP addresses are basically a big lot of HP placeholders for enemies and bosses. When an enemy loads, the game arbitrarily picks one for use (arbitrarily is definitely the wrong word to use, but to someone who doesn't know the game code, it's a good enough word as any). There may be more that I missed, but these have worked just fine for me.
Now that I'm looking, I did find an early version of my tests. It's not much use, but it illustrates what I suggested earlier with checking each boss and powerup for frame costs:
Switch to Fireball (or back) - 50
Switch to Dragon (or back) - 62
Switch between Fireball and Dragon - 50
Level 1
-------
Monster Up 1 - 301
Monster Up 2 - 898
Monster Up 3 - 571 (0 if getting Lightning 1)
HP Up 1 - 0 (no need unless you get Lightning 1)
Lightning Up 1 - 819
HP Up 2 - 734
Lightning Up 2 - 950
Monster Up 4 - Way too long (lower one)
Monster Up 5 - 599
Boss w/ Lv1T - 183
Boss w/ Lv2T - 146
Boss w/ Lv3T - 141
(these three values assume you use the Fireball pet)
Level 2
-------
Lightning Up 1 - 474
Etc.
Oh also, for boss testing, just make a save state before the boss. From here you can toggle between different levels of lightning and pets by using the code. This make testing a bit faster!