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

Optimize string encoding #41

Merged
merged 5 commits into from
Mar 20, 2024
Merged

Optimize string encoding #41

merged 5 commits into from
Mar 20, 2024

Conversation

MarshalX
Copy link
Owner

@MarshalX MarshalX commented Mar 19, 2024

explanation: read_str performs from_utf8 in rust side which is not necessary because performed from CPython side too

todo: investigate possibilities of invalid utf8 strings here and how it be handled

Copy link

codspeed-hq bot commented Mar 19, 2024

CodSpeed Performance Report

Merging #41 will improve performances by 12.68%

Comparing optimize-string-encoding (1dbfbbc) with main (1c0df5e)

Summary

⚡ 3 improvements
✅ 189 untouched benchmarks

Benchmarks breakdown

Benchmark main optimize-string-encoding Change
test_dag_cbor_decode_fixtures[garbage-06] 91 µs 82.2 µs +10.61%
test_dag_cbor_decode_fixtures[garbage-09] 117.6 µs 104.7 µs +12.32%
test_dag_cbor_decode_fixtures[garbage-23] 75.5 µs 67 µs +12.68%

@MarshalX

This comment was marked as resolved.

@MarshalX

This comment was marked as resolved.

@MarshalX
Copy link
Owner Author

now it's even better!

image

@MarshalX MarshalX merged commit 04ba564 into main Mar 20, 2024
3 checks passed
@MarshalX MarshalX deleted the optimize-string-encoding branch March 20, 2024 21:13
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.

1 participant