I'm more familiar with Flash 8. But if it is also actionscript 2. I may know a little bit.
I have heard that coding things with if/else methods tends to have a longer reaction time. May also be a bit slower if your action works on the release of your keystroke, instead of upon contact. So having it coded with an 'on' instead of 'on release' oughta make things swifter, I suppose. But not sure if that even applies, because I don't know how much different the actionscript worked, long before Flash 8.
But was there also any difference in playback? The first and second time you tested your swf? Did you use exactly the same flash player both times? Or did you test one in the browser with ruffle, and the other one testing it inside of Flash4 itself? Because that could have a different effect on performance.
But totally not an expert on actionscript, just know how to use some entry-level stuff.
I think @gimmick may be the best dude, to help you out on this, if you have a bit more speciffic information about your problem.
He's been quite knowledgeable and helpfull with oldschool actionscript problems in the past.