When it comes down to speedrunning and trying to escape Baldi, your best bet is to try and run. But, of course, one of the rules is "no running in the halls", and the principal can or cannot be very persistent, depending on RNG and your luck.
There IS a way around that, however. After you get the 2nd notebook and the real game begins, when you are in the halls or the cafeteria or anywhere near the principal, repeatedly spam the run key (you may want to turn off the Sticky Key shortcut or assign a different key). You will be going at almost the same speed as if you were flat-out running, and your stamina will last a little longer. But what's more important is that if you spam the run key rather than just running as fast as you can, the principal will not bust you! I've seen WR speedrunners like xem92 do this, and it does help me shave off several seconds. Utilize this whenever you can, and when you're in a classroom or almost to the last notebook, you can go ahead and run, if the principal isn't near.