Question: Out of curiosity, why does it often take *seconds* to obtain network configuration via DHCP when the CPU is capable of processing millions of operations per second and ping to the router takes a couple of milliseconds?

In my home environment with one WiFi router and about 5 devices, it is not rare to see times like 5-10 seconds.

Answer: 
Two reasons (and solutions) I found when I wanted fast replies from my DHCP server. 

1) My DHCP did a ping of the address it wanted to allocate. This added 3 seconds delay. I removed this by changing the DHCP config to have a mapping for MAC Address to IP address. This is basically using DHCP to allocate a static address. This removed the 3 second delay for me.

2) I have an isolated network, however, you may get this at times. There was a DNS look up being done, which for me resulted in many seconds delay from getting an IP Address from DHCP. In the DHCP server config there were options for our domain and DNS servers. After removing DNS options and above change I got instant replies from the DHCP server. (\*\*)

These issues were what I found in my setup. Your milage may vary.

cheers

LB

(\*\*) If I had a penny for every time a failed DNS lookup caused a delay which resulted in a strange knock on affect which resulted in me scratching my head, I would have many many pennies.
If you are experiencing performance problems with dhcp;

1. Check network latency
2. Look at packet cap dhcp negotiation. You should be able to see what action is taking a long time. (problem may not be with the dhcp server, who is waiting on who?)
3. Examine dhcp server load and logs.