powdr-labs / powdr

A modular stack for zkVMs, with a focus on productivity, security and performance.
Apache License 2.0
357 stars 76 forks source link

Single syscall modmul and modadd submachine #1436

Open qwang98 opened 2 months ago

qwang98 commented 2 months ago

Background

The issue

Basic proposal

Additional proposal to reduce column C

Additional proposal to reduce columns Q and R

Other potential optimizations

qwang98 commented 2 months ago

@georgwiese @pacheco Thoughts? :)

pacheco commented 2 months ago

I think this makes sense, in particular once we reduce the "fixed" cost of doing ecalls, which is quite high right now. I don't know about the proving cost for each approach (accelerate ec VS modular operations) but we can measure and compare once we have everything in place.