If I believe I have a lot of knowledge to transfer, I'll do a 2 week + X notice. I've done 1m notice, and that was excessive I believe. Otherwise, 2 weeks is standard in the US, and I have no reason to deviate. Nor would I conventionally just walk out that-day, as that leads to a bad odor.
If I was waiting for a bonus or cliff, of course I'd wait until after the date before formally giving notice. Because, of course, that would be a problem if the Management decided to terminate me immediately.
It's quite contextual, of course, but I prefer to follow local standards.