Closed ahamlat closed 1 month ago
I put in https://github.com/Consensys/linea-arithmetization/pull/748/commits/b99310d7d6aae8a2886141d37f0b4ebef9595a9e the default size to 5 as it's the max for our arithmetization. Is it usefull to have something even better ?
5 is already a good one, because it will reduce from the shallow size of the underlying array from 56 to 40. Do you know if the size can go beyond 5 ?
No it can't, it's the max. It'll always be between 1 and 5
Should we close this as completed or there will be an impact to provide the exact nb of moduleCall ?
I think for now, we can make it simple, i.e keep the size configured to 5, and do another profiling work after le PR is merged.
This issue is similar to https://github.com/Consensys/linea-arithmetization/issues/801. We're tracking all object allocations that are referenced from TraceSection, as we may have hundred of thousands instances of TraceSection. In the example below, elementData consumes 56 bytes shallow size because the size by default is 10, and in this case elementData inside the arrayList consumes 56 bytes (see https://github.com/Consensys/linea-arithmetization/issues/801).
Reducing the size to 1 in this case would reduce the (shallow) size of elementData from 56 to 24
Fixing the size works only if we know the target size, and the array list is not resized after initialization.