Talked to a bunch of people. It really depends on your current skill level.
As I had a lot of dives on sidemount and was well past my Full Cave (i.e. fine-tuned fundamental skills) + read many books on deco theory etc, doing the ANDP in 4 days (until certified) was easy. Then I did 4 more dives with that instructor just because I wanted to further train some of the things. But many people do it the other way around and AN/DP is the first real tech course... Then it's easily more.
For many of my friends, that was the case (recently switched to doubles, for instance) so it took them 5-7 days.
If you need to work on fundamental skills, the conditions are hard, etc... Reserve 7 days to be sure.
Personally, I think tech courses are a ton of fun, no reason to rush through them.