I've heard conflicting opinions on that matter.
Some say that accessing data allocated on the heap (ie std::vector or dynamic arrays allocated through malloc) is always marginally slower than accessing data allocated on the stack, because the process must always go through an intermediate pointer to access that data, which is likely located on a wholly different area of memory; on the other hand, they maintain, accesing data allocated on the stack doesn't require going through this intermediate pointer and this data is likely already cached.
Others claim that only allocation of data is slower on the heap than on the stack (because of the overhead of malloc, mmap and similar functions), but access is not, except for the rare cases when the stack and the heap are located on different physical drives.
What is the truth?