NilFoundation / zkLLVM

Zero-Knowledge Proof Systems Circuit Compiler
https://docs.nil.foundation/zkllvm
285 stars 48 forks source link

[Feature request]: Reduce size of assignment table file by using RLU coding #523

Open akokoshn opened 8 months ago

akokoshn commented 8 months ago

Problem

The size of file with assignment table is huge, writing/reading it (sys call) takes time. At the same time assignment table contains many zero values and we can use it,

Solution

Simple way - just apply RLU coding on marshaling step (for array_list member of tuple) and decode on the serialization.

Initial research

For sha2_256 example reduce size from 1795162136 to 432555642, ant time 2.5 sec to 1 sec

https://github.com/NilFoundation/zkLLVM/pull/521

image

akokoshn commented 7 months ago

Completed implementation (AC):