Scoru: Use immutable CBV internally in the original CBV
Context
This MR makes Chunked_byte_vector use under the hood Immutable_chunked_byte_vector`.
This is in order to alleviate two aspects:
- Remove byte by byte copying in Chunked byte vector
store_bytes, which looks ineffective on its own, moreover, usedLwtfor each copying - Eliminate mutability from Chunked_byte_vector: now all the operations are made in an immutable way but reference to immutable CBV is kept by original CBV
Numbers on optimized/non-optimized kernels measured in debugger:
slow optimized
before: 10.9s 7.85s
after: 10.7s 7.7s
Launch of all generative snapshot tests (time _build/default/src/lib_scoru_wasm/test/main.exe --file test_durable_shapshot.ml):
before: 11.85s
after: 9.80s
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Ilya Peresadin