All the current Apple portables "hibernate" by default.
(Saving the RAM contents to disk, then going to sleep.)
The feature is called "SafeSleep," and Apple's reason for implementing it is so the contents of RAM aren't lost when the battery dies.
With a desktop... you don't have a battery, so there isn't a reason for SafeSleep to be enabled. (But you could turn it on, if you wanted.) As such, your sleep/wake is quick.
Yours might if it's configured to hibernate instead of sleep when you close the lid.
There is no toggle for this in System Preferences. (Which makes most people think it just "works that way.")
You have to enter a terminal command, or use a script or third-party utility like Secrets, SmartSleep, etc.
Real Programmers think better when playing Adventure or Rogue.