Consensys / linea-arithmetization

19 stars 19 forks source link

perf: compute only once the number of line #743

Open letypequividelespoubelles opened 1 month ago

letypequividelespoubelles commented 1 month ago

confirmed by @fab-10 and @ahamlat , the sequencer doesn't have the need to pop more than one tx in a row. It implies that:

OlivierBBB commented 1 month ago

Also, wouldn't it make sense when accumulating operations to be performed by modules such as ADD, WCP etc... (i.e. modules where order of operations is irrelevant and that are stateless) to just accumulate stuff in a list as it arrives ? By this I mean: not check for duplicates as you insert the operation. And at the end of the transaction when you want to count lines etc ... take the above, sort it and remove duplicates ? It seems like this way it would have a cost of n * log(n) once rather than doing all these "membership tests" with every operation of the module.