It's both - think of having to look something up on the Internet as an L1 cache miss, while having to look something up and then try multiple variations as an L2 cache miss (having the API in muscle memory so you don't have to think about it is a register hit). It may take you 3 seconds to write out an API call from memory, 3 minutes to search for it on the Internet, and 3 hours to diagnose a problem through trial and error. Occasionally even as much as 3 weeks - I've had bugs that lasted that long when it was a bug in the underlying framework, because you never expect that the bug will be in someone else's code.
Obviously avoiding the 3-week bugs will save you more time than the 3-minute lookups, but you can continue to improve significantly by turning many of those 3-minute lookups into 3-second typing bursts.
Obviously avoiding the 3-week bugs will save you more time than the 3-minute lookups, but you can continue to improve significantly by turning many of those 3-minute lookups into 3-second typing bursts.