-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iovec: improve way or reading/writing subranges
We have a IoVecSubregion type for describing sub-regions inside an initial IoVecBuffer(Mut) type. This is useful type for de-duplicating the code that finds a valid sub-region so that we can do something with it later. However, the type was essentially duplicating (some of) the state of the initial IoVecBuffer(Mut). The memory overhead should not be significant, but the book-keeping overhead (creating yet another Vec) is noticeable. Moreover, the interface was leading us to have some nested loops. This was increasing significantly the time for kani harnesses. This commit drops the IoVecSubregion type and replaces the functionality with a simple loop that performs the necessary operation on a valid sub-range. Signed-off-by: Babis Chalios <[email protected]>
- Loading branch information
Showing
1 changed file
with
106 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters