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

perf(serde_v8): drop need for RC in serializer #9987

Merged
merged 1 commit into from
Apr 3, 2021

Conversation

AaronO
Copy link
Contributor

@AaronO AaronO commented Apr 3, 2021

Which substantially improves the performance of to_v8() by removing RC's overhead (extra allocs, drops, checks, etc...)

This breaks through the symbolic barrier of 200ns/op overhead (on my machine) ! 🚀 🚀 🚀
(The last symbolic milestone before going sub 100ns/op, which will be very hard to cross ...)

Benches

Note that the before and after of these benches integrates changes from #9983.

Before:
test bench_op_async   ... bench:     716,780 ns/iter (+/- 28,508)
test bench_op_nop     ... bench:     213,206 ns/iter (+/- 5,618)
test bench_op_pi_bin  ... bench:     243,481 ns/iter (+/- 6,120)
test bench_op_pi_json ... bench:     227,972 ns/iter (+/- 5,995)

After:
test bench_op_async   ... bench:     647,272 ns/iter (+/- 57,528)
test bench_op_nop     ... bench:     157,173 ns/iter (+/- 2,096)
test bench_op_pi_bin  ... bench:     179,239 ns/iter (+/- 4,354)
test bench_op_pi_json ... bench:     175,075 ns/iter (+/- 1,814)

Which substantially improves the performance of to_v8() by removing RC's overhead (extra allocs, drops, checks, etc...)
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 878599c into denoland:main Apr 3, 2021
@AaronO AaronO deleted the serde-v8/optimize-ser-drop-rc branch April 3, 2021 22:42
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.

None yet

2 participants