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

new function #1

Closed
wants to merge 9 commits into from
Closed

new function #1

wants to merge 9 commits into from

Conversation

ckcr4lyf
Copy link
Owner

@ckcr4lyf ckcr4lyf commented Apr 3, 2022

10% vs 67%

image

hum

@ckcr4lyf
Copy link
Owner Author

ckcr4lyf commented Apr 3, 2022

url to hex: 4.5% vs 82%

image

url_hex

@ckcr4lyf
Copy link
Owner Author

ckcr4lyf commented Apr 3, 2022

23% vs 65%
serde_qs is ~18% in both cases, so with bad math the improvement in the function otherwise is ~9x. Time to write my own query parser???

image

parse_announce

let lower_4 = x & 0x0f;
let is_letter = (x & 0x40) >> 6;

return lower_4 + is_letter * 9;
Copy link
Owner Author

Choose a reason for hiding this comment

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

We should probably add some comments / ref as to how the bitwise operations work to achieve the desired result, especially in relation to the ASCII codes and binary stuffs

@ckcr4lyf
Copy link
Owner Author

Stale, closing.

@ckcr4lyf ckcr4lyf closed this Jun 22, 2023
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

1 participant