-
Notifications
You must be signed in to change notification settings - Fork 115
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
Minimize unsafe usage and rework line wrapping #31
Minimize unsafe usage and rework line wrapping #31
Commits on Apr 30, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 0c15adf - Browse repository at this point
Copy the full SHA 0c15adfView commit details -
Rewrite line wrapping to use a linear-time algo.
Encoded bytes are moved from the end to the front so each byte is only moved once. Encoding is somewhat rearranged to operate on a slice into the output buffer. This makes it easier to avoid clobbering any existing bytes in the buffer, as well as paving the way to slice- based encoding needed for a Display wrapper, stream adapters, etc.
Configuration menu - View commit details
-
Copy full SHA for f775196 - Browse repository at this point
Copy the full SHA f775196View commit details
Commits on May 3, 2017
-
Configuration menu - View commit details
-
Copy full SHA for adfde3c - Browse repository at this point
Copy the full SHA adfde3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a72d575 - Browse repository at this point
Copy the full SHA a72d575View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1683292 - Browse repository at this point
Copy the full SHA 1683292View commit details
Commits on May 5, 2017
-
Minimize unsafe use on the basic encode code path.
At the cost of a 30% encode speed hit, the only unsafe used outside of line wrapping is to view the output buffer as a Vec<u8>.
Marshall Pierce committedMay 5, 2017 Configuration menu - View commit details
-
Copy full SHA for cab488a - Browse repository at this point
Copy the full SHA cab488aView commit details
Commits on May 6, 2017
-
Help the optimizer by making some intermediate slices.
Hand unroll the main encode loop 4x. 8x was barely better on longer inputs, but only barely, and it hurt shorter inputs that then couldn't enter the loop at all.
Marshall Pierce committedMay 6, 2017 Configuration menu - View commit details
-
Copy full SHA for eeb9f5c - Browse repository at this point
Copy the full SHA eeb9f5cView commit details -
Use safemem's ptr::copy wrapper in line_wrap.
Marshall Pierce committedMay 6, 2017 Configuration menu - View commit details
-
Copy full SHA for 184bf14 - Browse repository at this point
Copy the full SHA 184bf14View commit details
Commits on May 8, 2017
-
Use a const for number of blocks per encode fast loop
Marshall Pierce committedMay 8, 2017 Configuration menu - View commit details
-
Copy full SHA for b698641 - Browse repository at this point
Copy the full SHA b698641View commit details
Commits on May 9, 2017
-
Tests ensuring that encoding and padding produce utf8.
Marshall Pierce committedMay 9, 2017 Configuration menu - View commit details
-
Copy full SHA for bb31229 - Browse repository at this point
Copy the full SHA bb31229View commit details
Commits on May 18, 2017
-
Syntactic tidying, plus removing some tests.
The old tests that exhaustively check strings a couple bytes long weren't that useful, and only checked one config. Using the random config helper in src/tests.rs is a better use of wall clock time when waiting for tests to run.
Configuration menu - View commit details
-
Copy full SHA for 91366d5 - Browse repository at this point
Copy the full SHA 91366d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ed5dde - Browse repository at this point
Copy the full SHA 8ed5ddeView commit details