{{ message }}

Instantly share code, notes, and snippets.

# Rich Lander richlander

Created Aug 18, 2014
Instructions to Install and Use RyuJIT
View RyuJIT-Install-Instuctions.md

# Try RyuJIT -- Your code runs faster on X64 Windows

## How to enable RyuJIT

RyuJIT only works on 64-bit editions of Windows Vista and Windows Server 2008 and later.

After installation, there are two ways to turn on RyuJIT. If you just want to enable RyuJIT for one application, set an environment variable:

Last active Aug 29, 2015
Code sample with documented output
View list.cs
 using System; using System.Collections.Generic; public class Program { public static void Main() { // Demonstrates common uses of List. // Doc: https://msdn.microsoft.com/library/6sh2ey19.aspx
Created Jul 20, 2015
Compute the sums of the values in two arrays of integers, with Vector<T>
View ComputeSumsWithSIMD.cs
 // Task: Compute the sums of the values in two arrays of integers, A and B. // Traditional approach: for (int i = 0; i < size; i++) { C[i] = A[i] + B[i]; } // With Vector you can instead do this:
Created Jul 20, 2015
Null-Conditional operator (?.)
View csharp-null-conditional-operator.cs
 int length = customers?.Length ?? 0; // 0 if customers is null
Created Jul 20, 2015
 Public Class Customer Public ReadOnly Property First As String = "Jane" Public ReadOnly Property Last As String = "Doe" End Class
Created Jul 20, 2015
Null-Conditional operator (?.)
View vb-null-conditional-operator.vb
 Dim length As Integer = If(customers?.Length, 0) ' 0 if customers is null
Created Jul 20, 2015
C# 6 Static Imports
View csharp-static-imports.cs
 using static System.Console; using static System.Math; using static System.DayOfWeek; class Program { static void Main() { WriteLine(Sqrt(3 * 3 + 4 * 4)); WriteLine(Friday - Monday);
Created Jul 20, 2015
VB Static Imports
View vb-static-imports.vb
 Imports System.Console Imports System.Math Imports System.DateOfWeek Module Program Sub Main() WriteLine(Sqrt(3 * 3 + 4 * 4)) WriteLine(Friday - Monday) End Sub End Module
Created Jul 20, 2015
C# 6 NameOf operator
View csharp-nameof-operator.cs
 if (x == null) throw new ArgumentNullException(nameof(x));
Created Jul 20, 2015
C# 6 String Interpolation
View csharp-string-interpolation.cs
 var s = \$"{p.Name} is {p.Age} year{{s}} old";