Add "naive" versions of manually implemented applications?
AlexanderViand opened this issue · 1 comments
AlexanderViand commented
We currently contrast manually-optimized vs compiler-optimized programs . Except for the NN task, this tends to result in the manual versions significantly outperforming the compiled versions, so maybe it'd be interesting so a non-optimized ("naive") manual implementation?
E.g. cardio-seal could use a ripple-carry-adder vs the Sklansky adder
One more option would be to never use in-place operations, to always relinearize directly after each mult (which we might do already anyway) and maybe even to always use ctxt-ctxt operations, to really simulate a "poor" implementation?
Cardio
- SEAL-BFV
NN
- Not necessary, since even our best attempt is still worse than what tools can do
Chi-Squared
- SEAL-BFV
AlexanderViand commented
List of general "rules" for naive implementations:
- Use public-key encryption (not sk-enc) // Actually, it looks like SEAL-BFV-cardio already uses pk-encryption?
- Always use ctxt-ctxt operations (not ptxt-ctxt)
- Always use copy-based operations (if available)
- Always initialize ctxts
- Always relinarize after mult
- SEAL: Do not use encrypt_zero, instead actually pk-encrypt a zero
- Do not reuse common terms in expressions