Switches are not asked every Frame. They are just Values that exist in the Engine.
Conditions are asked every Frame.
Clean Code just has Conditions and runs them when necesarry.
If you execute too much Conditions it can also cause lag in the Eventeditor (not sure with pur ruby script in scripteditor)
But its allowed to have some dirty code , it makes programming easier sometimes and as long the Game doesnt lag who cares if it does what it should)
But others say its good practice to practice and make clean code. (They are right but sometimes iam just lazy and on this Map i just use one Time i make 5 instead of 2 paralell Events

) ok this goes off topic.
Ok so people often do the mistake and instead of using conditional branches in a correct way, they execute commandsa like set player movespeed, change grafic and stuff
like that every frame or with wait every 4 frames, insteed of just one time when needed. Such command cost several dozens more Performance than a simple conditional branch that got executet every frame or every 4.
You are correct about the number of Events and Eventpages , they get checked every frame and the code loops every felt 4frames.
(This is why some people use antilag script to reduce eventupdate on events that are just used for mapping or far out of range of view.
Sorry my english aint the best.
Edit: Mog Hunter Anti animation Lag i can recoment to Fix some Bugs and make Movement smoother.