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.Collections.Generic; | |
using System.Diagnostics; | |
using System.Runtime.Serialization; | |
using System.ServiceModel.Dispatcher; | |
using System.Threading.Tasks; | |
using Windows.ApplicationModel; | |
using Windows.Graphics.Display; | |
using Windows.Storage; | |
using Windows.Storage.Pickers; |
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
{ | |
"action": "reopened", | |
"number": 3, | |
"pull_request": { | |
"url": "https://api.github.com/repos/xoofx/SharpCLABot/pulls/3", | |
"id": 22243469, | |
"html_url": "https://github.com/xoofx/SharpCLABot/pull/3", | |
"diff_url": "https://github.com/xoofx/SharpCLABot/pull/3.diff", | |
"patch_url": "https://github.com/xoofx/SharpCLABot/pull/3.patch", | |
"issue_url": "https://api.github.com/repos/xoofx/SharpCLABot/issues/3", |
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; | |
public struct ValueBase | |
{ | |
public int A; | |
public int B; | |
public int Calculate() | |
{ |
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
# YAML Version of the JSDL Autodesk example http://area.autodesk.com/blogs/chris/json-scene-description-language | |
# This version is using flow nodes [ ] { } like JSON but is less verbose by removing all double quotes | |
{ | |
id: my_scene, | |
roots: [ | |
{ | |
assets: [Square], | |
children: [ | |
{ | |
transform: |
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
/*********************************************************************************************** | |
Microsoft.Common.CurrentVersion.targets | |
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | |
created a backup copy. Incorrect changes to this file will make it | |
impossible to load or build your projects from the command-line or the IDE. | |
This file defines the steps in the standard build process for .NET projects. It | |
contains all the steps that are common among the different .NET languages, such as | |
Visual Basic, and Visual C#. | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
***********************************************************************************************/ |
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
var config = ManualConfig.Create(DefaultConfig.Instance); | |
var gcDiagnoser = new MemoryDiagnoser(); | |
config.Add(new Job { Mode = Mode.SingleRun, LaunchCount = 2, WarmupCount = 2, TargetCount = 10 }); | |
config.Add(gcDiagnoser); | |
_________________________________ Patch for BenchMarkDotNet to have precise GC: | |
diff --git a/BenchmarkDotNet/Running/MethodInvoker.cs b/BenchmarkDotNet/Running/MethodInvoker.cs | |
index e8d8de5..6a46aa2 100644 |
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
// Follow up of the discussion https://twitter.com/stebets/status/739563007202758656 | |
public static unsafe string IntegerToIPAddress(uint input) | |
{ | |
var text = stackalloc char[15]; | |
var ptext = text + 15; | |
for (int i = 0; i < 4; i++) | |
{ | |
if (i > 0) | |
{ |
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
// Follow up of https://twitter.com/stebets/status/739563007202758656 | |
private static readonly string[] ByteToString = Enumerable.Range(0, 256).Select(x => x.ToString()).ToArray(); | |
public unsafe static string FastIntegerToIPAddress2(uint input) | |
{ | |
// t3.t2.t1.t0 | |
var t0 = ByteToString[input & 0xFF]; | |
input = input >> 8; | |
var t1 = ByteToString[input & 0xFF]; | |
input = input >> 8; |
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
// Check the performance of using an Array (preallocated) vs a List<T>, vs a Dictionary<string, T> | |
// both in terms of CPU and memory | |
// * Summary * | |
// | |
// BenchmarkDotNet=v0.9.7.0 | |
// OS=Microsoft Windows NT 6.2.9200.0 | |
// Processor=Intel(R) Core(TM) i7-4770 CPU 3.40GHz, ProcessorCount=8 | |
// Frequency=3319351 ticks, Resolution=301.2637 ns, Timer=TSC | |
// HostCLR=MS.NET 4.0.30319.42000, Arch=32-bit RELEASE | |
// JitModules=clrjit-v4.6.1080.0 |
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.IO; | |
using System.Runtime.CompilerServices; | |
namespace System.Runtime.CompilerServices | |
{ | |
[AttributeUsage(AttributeTargets.Method)] | |
internal class CompilerIntrinsicAttribute : Attribute { } | |
} |
OlderNewer