intel / intel/confidential-computing.sgx.sdk
The std::vector performance inside enclave is 40 times slower than it in the untrust code
- Dominant language
- C++
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Run a simple test inside enclave as below:
int ecall_test(uint32_t num)
{
ocall_record_time(0);
std::vector vi1(num);
ocall_record_time(1);
return 0;
}
The performance is 40 times slower.
One of the test result (worse):
./app 1000000
construct vector size: 1000000
eid: 2
enclave: time duration 13329 us
no enclave: time duration 243 us
cpuinfo:
cpu family : 6
model : 158
model name : Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz
stepping : 9
microcode : 0x8e
cpu MHz : 3800.000
cache size : 8192 KB
Contributor guide
Research direction
Start by reproducing the reported case with the shown ecall_test function and ./app 1000000, comparing enclave and non-enclave timings. Review the issue discussion for any identified causes or constraints, then trace the vector construction path used inside the enclave. Done means explaining the performance gap and providing a verified improvement or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100