Typically not much, but in practice if you truly have a unique technical moat it's easy enough that I'd get a provisional patent in place just in case.
I would start accumulating patents at a gradual pace at around $100m ARR in preparation for IPO, assuming that you feel that is in the cards.
Makes sense (do believe something big is on the cards). As a micro-entity, filing fees are nominal, so I guess it doesn't hurt.