Neednt have done vs didn’t need to do
- I needn’t have attended the meeting.
- I didn’t need to attend the meeting.
Didn’t need to vs needn’t have done
- Sentence 1 means that I attended the meeting while it wasn’t necessary. The thing is, I didn’t know that it was unnecessary to go to the meeting. Maybe I regret it.
- Sentence 2 indicates that I didn’t attend the meeting because I knew it was unnecessary.
Take a look at the difference between Stop doing sth and stop to do sth