Skip to content

Conversation

@Shnatsel
Copy link
Contributor

Switch from SmallVec to TinyVec, which is an implementation of the same idea but in 100% safe code. SmallVec has a less-than-stellar track record in terms of safety.

Sadly this drops the size of pre-allocated segment on the stack to 32 because Default is only implemented for arrays of size up to 32. This did not result in any measurable difference in performance on the samples I've thrown at it (speech, music, both short and long samples, low and high bitrates), but it's possible that I simply haven't found the right sample.

…fault is only implemented for arrays of size up to 32.
Copy link
Member

@est31 est31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Safety is very important for lewton.

TinyVec has an MSRV of 1.36.0 so there is no issue from that side.

@est31 est31 merged commit 21c5f09 into RustAudio:master Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants