[go: up one dir, main page]

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, used Lwt for 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.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Ilya Peresadin

Merge request reports

Loading