Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make unsound code opt-in. #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Make unsound code opt-in. #51

wants to merge 1 commit into from

Conversation

finnbear
Copy link
Member

@finnbear finnbear commented Jan 1, 2025

Fixes #50

Benchmarked on i7-7700k

Before (default features) or After (unsound feature):
test str::tests2::bench_str_vec_encode                      ... bench:      98,474.54 ns/iter (+/- 34,320.73)
test derive::option::tests2::bench_option_u16_vec_encode    ... bench:         674.79 ns/iter (+/- 102.70)
test bool::test2::bench_bool_vecs_encode                    ... bench:         327.71 ns/iter (+/- 9.80)
test derive::vec::test::bench_vec_encode                    ... bench:          35.98 ns/iter (+/- 2.39)

After (default features):
test str::tests2::bench_str_vec_encode                      ... bench:     126,276.70 ns/iter (+/- 4,599.54)
test derive::option::tests2::bench_option_u16_vec_encode    ... bench:         767.94 ns/iter (+/- 26.88)
test bool::test2::bench_bool_vecs_encode                    ... bench:         454.65 ns/iter (+/- 18.57)
test derive::vec::test::bench_vec_encode                    ... bench:          38.67 ns/iter (+/- 4.02)

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.

unsafe_wild_copy is undefined behaviour
1 participant