Hi MUGG, I ended up deciding to remake the whole TAS starting with your level 1 improvement, and trying to save frames where I could. It seems that the game lags at different times even with the same inputs and RNG values, so I wasn't able to simply resync any changes with the existing TAS. I am using Memory Watch to monitor position, speed, and RNG. So far I've finished the first 3 levels and have saved about 60 frames by the third room of level 4, and will try to incorporate your movement for the mint leaf room after Kracko Jr.
https://tasvideos.org/UserFiles/Info/638476362094803044
After the 10 frames saved from the new level 1 room 3, I saved another 22 in the Whispy fight (the number of frames saved at any point is only an approximation since every change can potentially increase or decrease lag later on). I kept the first half of the fight the same but held on to the fourth apple for reasons explained below. I saved about 11 frames in the first 2 rooms of level 2 but lost nearly all of it to increased lag in the rest of the level. I ended up with 1 extra health but couldn't find any way to use it to save time. 18 more frames were cut out in level 3, mostly due to a faster strat at the end of room 2. I'm 65 frames ahead of the current TAS after the first 2 rooms of level 4 due to less lag, although this was a bit more intentional than other stages as I destroyed more/different enemies. Using JP v1.0 could maybe be faster, but I'd be worried about multiple simultaneous stars causing lag. I'll stick with v1.1 since that's what I've been using, but I'll consider v1.0 if I can't get perfect RNG at some point.
Some things I've noticed but haven't seen documented or can offer clarification for:
You can perform an inhale cancel by pressing up after B. If the inhale is cancelled immediately, it seems to always advance RNG 3 values, and takes about 16 frames to do. This can be helpful for quickly advancing RNG to a desired value.
Damaging Whispy Woods at any time will cause the next object to take significantly longer to spawn - it doesn't matter if the hit is during Whispy's attack or between attacks. Because of this, I didn't hit Whispy with the fourth apple until the sixth one had already spawned. This is still somewhat slow since Whispy seemingly can't be hurt quickly twice in a row (if two apples hit Whispy within a short time-frame, the damage will still occur, but it will be delayed), but it's faster than using the fourth apple early.
Apparently movement speed is maintained through certain loading zones. Touching the star to end a level with horizontal speed will cause Kirby to start with that speed on the first frame of the next level, meaning he can accelerate instantly in that case. Touching the level 1 star with some speed while floating allowed me to get into the door at the start of level 2 about 5 frames faster, and I was able to touch the level 2 and 3 stars with some speed as well, saving more frames. Speed is also maintained during the load after beating Lololo (the miniboss, not the boss - although speed is maintained during the load after the boss as well), but when I tried to maintain full speed in that case the next room lagged much more and gave me a slower load at the end of the room, so I scrapped that idea.
Subpixels are maintained through doors, so in some cases it can be beneficial to slow down in order to enter a door with a higher X subpixel, either because you have an extra pixel to spare or because the door loads faster and makes up for the later entry. This can certainly be exploited any time Kirby enters a door from the right, since you can slow down to get a higher X subpixel without losing a pixel. You can also jump before/into a door if a different Y subpixel would be more beneficial for the next room.
When approaching a wall, Kirby will seemingly be placed against it and his speed set to zero as soon as he comes within one pixel of the wall, even if he should be many subpixels away. This means that to go through a wall of star blocks like Kirby does twice in the second room of level 3, he must go from being at least one X pixel away from the wall to being past the wall while at the correct Y pixel the entire time. This is easy if Kirby's Y pixel is correct for multiple frames, like at the peak of a jump, but must occur during a single frame if Kirby is falling at terminal velocity, like at the end of the room (credit to Marche9th for figuring out how this works).
I've noticed that there seems to be something akin to a framerule when entering doors, although it doesn't seem consistent - sometimes I will enter the door 1 or 2 frames earlier but it will just take longer to load and won't be any faster, then if I save even more frames it loads instantly, suddenly saving 3 or 4 frames all at once. Is there anything known about that, or about why the game lags at different points even with the same inputs and enemies on-screen?
Sorry for the long post.