Skip to content

Conversation

@xtqqczze
Copy link
Contributor

Follow-up to #51365.

@ghost
Copy link

ghost commented May 11, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

{
FormattingHelpers.FillWithAsciiZeros(destination.Slice(0, leadingZeroCount));
// Fill with ASCII zeros
destination.Slice(0, leadingZeroCount).Fill((byte)'0');
Copy link
Member

Choose a reason for hiding this comment

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

Note that Utf8Formatter is typically going to use this method for very small sizes. Is Array.Fill faster for these small sizes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I run some tests, it seems the for loop may be faster for leadingZeroCount < 8.

@eerhardt
Copy link
Member

Failures of the following form:

You cannot extract a file outside of the target path

are #52596

@xtqqczze xtqqczze marked this pull request as draft May 12, 2021 03:17
@ghost ghost closed this Jun 11, 2021
@ghost
Copy link

ghost commented Jun 11, 2021

Draft Pull Request was automatically closed for inactivity. Please let us know if you'd like to reopen it.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 11, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants