syedelec opened a new issue, #89:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/89

   Hello
   
   I noticed a quite performance difference between TA written in Rust using 
the SDK and TA written in C
   
   This can be easily reproducible using the simple random example.
   In the example, a simple 16 bytes array is generated.
   
   ```
   root@stm32mp1-board:~# time random-rs
   Invoking TA to generate random UUID...
   Invoking done!
   Generate random UUID: 7db2031f-a7d1-6294-5ebb33c08f88101f
   Success
   real 0m 1.01s
   user 0m 0.00s
   sys  0m 0.99s
   root@stm32mp1-board:~# 
   root@stm32mp1-board:~# time optee_example_random 
   Invoking TA to generate random UUID... 
   TA generated UUID value = 0x76ed50d34af98d4b0b089e1921cad
   real 0m 0.71s
   user 0m 0.00s
   sys  0m 0.70s
   ```
   
   I tried with a normal world app that does the following:
   
   - Generate Random 32 bytes
   - Generate Random 64 bytes
   - Hash "test" message with SHA256
   - Hash "test" message with SHA384
   - Hash "test" message with SHA512
   
   The C TA performed the above in ~1.5sec and the Rust TA in ~6sec
   I also tested to write the same normal world app in Rust and C but it gave 
the same results.
   
   It has been tested on a stm32mp157c-dk2 board using [OP-TEE OS 
3.16.0](https://github.com/STMicroelectronics/optee_os)
   
   Let me know if you have an idea on the root issue.
   Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org
For additional commands, e-mail: dev-h...@teaclave.apache.org

Reply via email to