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.Runtime.CompilerServices; | |
| using System.Runtime.Serialization; | |
| var specificCombinationDictionary = new MultikeyDictionary<(int,int), string>(); | |
| specificCombinationDictionary[(1, 2)] = "3"; | |
| var anyKeyDictionary = new MultikeyDictionary<ITuple, string>(); | |
| anyKeyDictionary[(1, 2)] = "3"; | |
| anyKeyDictionary[("str", DateTime.UtcNow.Date)] = "undefined err"; | |
| anyKeyDictionary[(1, 3, 5, "what? a string?!", ("sub?", "Tuple??"))] = "undefined err"; |
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.Runtime.InteropServices; | |
| var alloc = new Allocation(); | |
| Console.WriteLine("Hey, this tool will allocate how much memory you'll type in and reallocate "); | |
| try { | |
| Task.Run(async () => { | |
| while (true) { | |
| await Task.Delay(60000).ConfigureAwait(false); | |
| if (!alloc.Buffer.HasValue) | |
| continue; |
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.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Drawing; | |
| using System.Drawing.Imaging; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.CompilerServices; | |
| using System.Text; |
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace RegenTesting | |
| { | |
| class Shape | |
| { |
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.Runtime.InteropServices; | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Engines; | |
| using NumSharp.Backends; | |
| using NumSharp.Backends.Unmanaged; | |
| using NumSharp.Memory.Pooling; | |
| using NumSharp.Utilities; | |
| namespace NumSharp.Benchmark.Unmanaged | |
| { |
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
| import numpy as np | |
| errors = 0 | |
| rights = 0 | |
| outputShapes = list() | |
| def operator_(left, right, msg): | |
| global errors, rights, outputShapes | |
| print("") |
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.Runtime.CompilerServices; | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Engines; | |
| using NumSharp.Backends.Unmanaged; | |
| using NumSharp.Memory.Pooling; | |
| using NumSharp.Utilities; | |
| namespace NumSharp.Benchmark.Unmanaged | |
| { |
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 BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Engines; | |
| namespace OMath.Benchmarks | |
| { | |
| //| Method | Mean | Error | StdDev | Median | Min | Max | Ratio | RatioSD | | |
| //|--------------------------------------- |----------:|----------:|----------:|----------:|----------:|----------:|------:|--------:| | |
| //| BasicClass | 2.542 us | 0.0209 us | 0.0299 us | 2.526 us | 2.516 us | 2.613 us | 1.00 | 0.00 | | |
| //| InterfacedClass | 2.535 us | 0.0116 us | 0.0173 us | 2.528 us | 2.517 us | 2.570 us | 1.00 | 0.01 | |
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
| [MinColumn, MaxColumn, MeanColumn, MedianColumn] | |
| [SimpleJob(launchCount: 1, warmupCount: 3, targetCount: 15)] | |
| public class ParallelFor { | |
| private const int iterations = 10; | |
| private int largeSize = 50_000; | |
| DArray<int> a; | |
| DArray<int> b; | |
| private ParallelOptions settingsDistributed; | |
| private ParallelOptions settingsConcurrent; |
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
| [SimpleJob(RunStrategy.ColdStart, targetCount: 20)] | |
| [SimpleJob(RunStrategy.Throughput, targetCount: 20)] | |
| [MinColumn, MaxColumn, MeanColumn, MedianColumn] | |
| [HtmlExporter] | |
| public unsafe class GetSpan { | |
| private const int length = 100_000; | |
| private const int iterations = 20_000; | |
| private UnmanagedArray<int> from; | |
| private Vector<int> fromvec; |
NewerOlder