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
| using System; | |
| namespace spantest | |
| { | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| using BenchmarkDotNet.Attributes.Jobs; | |
| using BenchmarkDotNet.Diagnosers; | |
| using System.Linq; | |
| [MemoryDiagnoser] |
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
| using System; | |
| static class ByteComparer | |
| { | |
| public static bool AreSameSpan(byte[] b1, byte[] b2) | |
| { | |
| var span = new Span<byte>(b1); | |
| var span2 = new Span<byte>(b2); | |
| return span.SequenceEqual(span2); | |
| } |
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
| using System; | |
| namespace unsafefixedtest | |
| { | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| public class UnsafeFixedBench | |
| { | |
| [Params(1000)] | |
| public int LoopNum; |
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
| using System; | |
| namespace miniprofilerclitest | |
| { | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| using BenchmarkDotNet.Attributes.Jobs; | |
| using StackExchange.Profiling; | |
| using StackExchange.Profiling.Storage; | |
| using System.Collections.Generic; |
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
| using System; | |
| namespace jilutf8jsontest | |
| { | |
| using Utf8Json; | |
| using Jil; | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| using BenchmarkDotNet.Attributes.Jobs; | |
| public struct MyModel |
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
| using System; | |
| namespace msgpack.utf8bench | |
| { | |
| using System.Linq; | |
| using System.Text; | |
| using MessagePack.Internal; | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| using BenchmarkDotNet.Diagnosers; |
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
| echo arg1 is %1 | |
| echo arg2 is %2 |
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
| using System; | |
| using System.Linq; | |
| static class Test | |
| { | |
| public static void ForeachWithIndex() | |
| { | |
| var strs = new string[] { "a", "b", "c" }; | |
| foreach (var (str, idx) in strs.Select((s, i) => (s, i))) | |
| { | |
| Console.WriteLine($"{str},{idx}"); |
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
| using System; | |
| namespace datatabletest | |
| { | |
| using System.Data; | |
| using System.Linq; | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |
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
| using System; | |
| namespace multithreadedhttpclient_core | |
| { | |
| using System.Threading; | |
| using System.Net; | |
| using System.Net.Http; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; |