Use memcpy in flex_trits_slice when buffers are aligned, i.e. start is on the boundary of flex_trit_t.
Test Plan:
The changes in the code are similar for TE3, TE4, and TE5; the difference is in handling tails.
test_flex_trits_slice in tests seem to cover edge cases and succeed for trit_encoding equal 3, 4, and 5.
Simple benchmark works as expected: 10M transaction deserializations work in 7 seconds.
Use
memcpy
inflex_trits_slice
when buffers are aligned, i.e.start
is on the boundary offlex_trit_t
.Test Plan:
The changes in the code are similar for TE3, TE4, and TE5; the difference is in handling tails.
test_flex_trits_slice
in tests seem to cover edge cases and succeed fortrit_encoding
equal 3, 4, and 5. Simple benchmark works as expected: 10M transaction deserializations work in 7 seconds.