-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: convert endianess while reading slice in a single pass
Replace unsafe_read_slice macro which first copies data to destination buffer and then swaps endianess if necessary with a read_slice macro which does the swapping in a single pass while the data is read. This is done with `[T]:chunks_exact` which splits source into chunks which can be converted into integer of desired type with from_xx_bytes method. Closes #189, Closes #196
- Loading branch information
1 parent
8d02d50
commit 3409ee1
Showing
1 changed file
with
20 additions
and
26 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