I'm a member of a secret Facebook group where comedians run draft jokes past each other and sometimes ask for other tips. Recently a person asked how we remember the running order for our intended set.
It's a truism that the art of comedy is concealing the art, so I hope I'm not giving away too many secrets here.
For me confidence is the key.
Earlier in the day I run through my jokes sub-vocally from memory, if possible more than once. Each gag I do has a unique keyword I know it by and while waiting to perform in the green room I grab my notebook & write out my list of keywords for the jokes I intend to do (Often the same list I rehearsed, but sometimes I feel mixing it up would be better) Then I use a vivid marker to write on my wrist the first letter of each keyword as a mnemonic. Usually I don't need to refer to the mnemonic as just having it there is sufficient for me to feel confident enough to do my set.
When I first started doing the mnemonics I was doing a fairly standard set and had a mnemonic of ETCH WEACH (Elephant, Tribe, Clothing ...). I couldn't for the life of me remember what the A was. Tessa & I discussed it and she couldn't remember either but I kept writing the A in case it came back to me. One day I found an early version of the list and discovered the A was just a transcription error. I kept it in the list for quite a while after that as a private joke and a tribute to my humanity (ref: Persian Flaw). I have actually told this story on stage a few times when the moment seemed right.
BTW: I have a joke I do very occasionally where I refer to how I was "recently" told off for relying on written lists of jokes and ask an audience member to help, then reveal I have some (different) keywords written elsewhere and get the guy to read keywords -- whichever keyword he reads I tell that joke. I'm always careful to pick a guy who looks pretty laid back. That's how I got the idea for using a vivid marker on my wrist instead of a ballpoint.
Very very occasionally when on stage I spontaneously add in a joke that isn't in the list, but that tends to throw me. Ad-lib jokes either referring to current events or even a reference to something the MC has said are fun too, but I've usually at least run them through in my head a couple of times before hitting the stage. A real ad-lib coming out my mouth on the spur of the moment is an interesting experience.