This file contains 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.Diagnostics; | |
using System.Runtime.InteropServices; | |
namespace ConsoleApplication1 | |
{ | |
unsafe class Program | |
{ | |
const int outerIterations = 10000; | |
const int innerIterations = 10000; |
This file contains 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
00007FF953D04AC3 mov rdx,r8 | |
00007FF953D04AC6 cmp rdx,10h | |
00007FF953D04ACA ja 00007FF953D04C43 | |
00007FF953D04AD0 movsxd rdx,edx | |
00007FF953D04AD3 cmp rdx,10h | |
00007FF953D04AD7 ja 00007FF953D04C43 | |
00007FF953D04ADD lea r8,[7FF953D04E18h] | |
00007FF953D04AE4 mov r8d,dword ptr [r8+rdx*4] | |
00007FF953D04AE8 lea rax,[7FF953D04AC3h] | |
00007FF953D04AEF add r8,rax |
This file contains 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
// Licensed under the MIT License (MIT) | |
using System; | |
using System.Diagnostics; | |
using System.Diagnostics.Contracts; | |
/// <summary>Provides a set of methods related to computing hashcodes.</summary> | |
unsafe public static class HashUtilities | |
{ | |
#region Static Methods |
This file contains 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.Collections.Generic; | |
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
namespace System | |
{ | |
public struct HashCode | |
{ | |
private int _bytesCombined; | |
private int _combinedValue; |
This file contains 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
/* The Computer Language Benchmarks Game | |
http://benchmarksgame.alioth.debian.org/ | |
started with Java #2 program (Krause/Whipkey/Bennet/AhnTran/Enotus/Stalcup) | |
adapted for C# by Jan de Vaan | |
simplified and optimised to use TPL by Anthony Lloyd | |
simplified to compute Cib alongside Crb by Tanner Gooding | |
optimized to use Vector<double> by Tanner Gooding | |
*/ |
This file contains 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
Beginning test case CreateScalar.UInt16 at 1/5/2019 8:30:02 AM | |
Random seed: 20010415; set environment variable CORECLR_SEED to this value to repro | |
Beginning scenario: RunBasicScenario | |
****** START compiling System.Runtime.Intrinsics.Vector128:CreateScalar(ushort):struct (MethodHash=16b94f02) | |
Generating code for Windows x86 | |
OPTIONS: compCodeOpt = BLENDED_CODE | |
OPTIONS: compDbgCode = false | |
OPTIONS: compDbgInfo = true | |
OPTIONS: compDbgEnC = false |
This file contains 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
Beginning test case CreateScalar.UInt16 at 1/7/2019 10:14:18 AM | |
Random seed: 20010415; set environment variable CORECLR_SEED to this value to repro | |
Beginning scenario: RunBasicScenario | |
****** START compiling System.Runtime.Intrinsics.Vector128:CreateScalar(ushort):struct (MethodHash=16b94f02) | |
Generating code for Windows x86 | |
OPTIONS: compCodeOpt = BLENDED_CODE | |
OPTIONS: compDbgCode = false | |
OPTIONS: compDbgInfo = true | |
OPTIONS: compDbgEnC = false |
This file contains 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
Beginning test case CreateElement.UInt16 at 1/7/2019 10:23:08 AM | |
Random seed: 20010415; set environment variable CORECLR_SEED to this value to repro | |
Beginning scenario: RunBasicScenario | |
****** START compiling System.Runtime.Intrinsics.Vector128:Create(ushort,ushort,ushort,ushort,ushort,ushort,ushort,ushort):struct (MethodHash=1e6cb80c) | |
Generating code for Windows x86 | |
OPTIONS: compCodeOpt = BLENDED_CODE | |
OPTIONS: compDbgCode = false | |
OPTIONS: compDbgInfo = true | |
OPTIONS: compDbgEnC = false |
This file contains 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.Globalization; | |
public static class DoubleClass | |
{ | |
public static bool CanBeDouble(string numericStr, out double value) | |
{ | |
return double.TryParse(numericStr, NumberStyles.Float, CultureInfo.InvariantCulture, out value); | |
} | |
} |
This file contains 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.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.Intrinsics; | |
using System.Runtime.Intrinsics.X86; | |
using BenchmarkDotNet.Attributes; | |
using nuint = System.UInt64; | |
namespace ConsoleApp3 |
OlderNewer