This repository was archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 522
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@benaadams Before after numbers? |
Will benchmark |
@@ -13,7 +13,7 @@ public class AsciiDecoderTests | |||
[Fact] | |||
private void FullByteRangeSupported() | |||
{ | |||
var byteRange = Enumerable.Range(0, 255).Select(x => (byte)x).ToArray(); | |||
var byteRange = Enumerable.Range(0, 256).Select(x => (byte)x).ToArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it wrong, is count not upper bound. Though current code still pass with this change.
Current is BenchmarkDotNet=v0.7.8.0
OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz, ProcessorCount=8
HostCLR=MS.NET 4.0.30319.42000, Arch=64-bit [RyuJIT]
Type=AsciiToString Mode=Throughput Platform=X64 Jit=RyuJit .NET=HostFramework
Approx 1 hour to benchmark |
@davidfowl new implementation is x 1.36 for 8 bytes (not including the string constructor which is the same in all cases; and the GC cost would dwarf the ASCII decode) |
161ea88
to
c3042ba
Compare
66f8171
to
0f9abfb
Compare
This was referenced Nov 20, 2015
Will come back to this |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.