Spackle dries more quickly and with less shrinkage than joint compound, and that fast dry time (usually about 30 minutes) means you can sand and paint over the filled flaws almost right away.
For long-lasting results, use regular spackle or joint compound ... including dry time and sanding time. Medium-sized holes may take a bit longer, especially if an additional layer of drywall ...