Enclave memory, as it is fetched from main memory, is decrypted and its integrity protection is verified. This protection can result in some performance loss. Therefore the enclave writer is encouraged to only access memory inside the enclave that they really need to protect. Enclave Code is capable of reaching outside the enclave and acting on unprotected data, which incurs no penalty. Once data is resident in the cache there is no security penalty for re-accessing that data, so algorithms which are cache efficient are also advised.