pado-labs / emp-rust

Efficient Multi-Party computation toolkit in Rust
19 stars 14 forks source link

Buffered IO is about 3-4x slower than emp netio #3

Closed xiangxiecrypto closed 1 year ago

xiangxiecrypto commented 1 year ago

Need to check out the implementation details.

xiangxiecrypto commented 1 year ago

emp c++ performance: image

emp rust performance: image

ujnss commented 1 year ago

The main reason is that the c++ version uses the memory address of the block array directly, while the rust version sends or receives blocks one by one.

Optimization. When sending, convert block arrays to [u8] first. When receiving, receive [u8] and then convert to block array. See #11.

xiangxiecrypto commented 1 year ago

improved performance in emp-rust

image