Hi, my name is Niklas Schilli. I am a .Net fanatic, a student and am loooking for opportunities to work in high-performance scenarios
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
INFO [2017-02-03 03:56:42Z]: Starting Xamarin Studio 6.2 (build 1798) | |
INFO [2017-02-03 03:56:42Z]: Running on Mono 4.8.0 (mono-4.8.0-branch/084f912) (64-bit) | |
INFO [2017-02-03 03:56:42Z]: Operating System: Mac OS X 10.11.6 | |
Darwin Niklass-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0 | |
Mon Jan 9 23:07:29 PST 2017 | |
root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64 | |
WARNING [2017-02-03 03:56:42Z]: Storage folder: /Users/niklasschilli/Library/Caches/Xamarin/AppInsights/ad58ff9da41d9e46a009b5b523971c10f8ed4e28 | |
ERROR [2017-02-03 03:56:42Z]: PersistenceTransmitter: Unhandled exception in CreateSenders: | |
INFO [2017-02-03 03:56:42Z]: GTK: Using gtkrc from /Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/gtkrc.mac | |
WARNING [2017-02-03 03:56:42Z]: Gtk-Warning: Locale not supported by C library. |
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
#include <stdio.h> | |
#include <stdlib.h> | |
static unsigned char e2a[256] = { | |
0, 1, 2, 3,156, 9,134,127,151,141,142, 11, 12, 13, 14, 15, | |
16, 17, 18, 19,157,133, 8,135, 24, 25,146,143, 28, 29, 30, 31, | |
128,129,130,131,132, 10, 23, 27,136,137,138,139,140, 5, 6, 7, | |
144,145, 22,147,148,149,150, 4,152,153,154,155, 20, 21,158, 26, | |
32,160,161,162,163,164,165,166,167,168, 91, 46, 60, 40, 43, 33, | |
38,169,170,171,172,173,174,175,176,177, 93, 36, 42, 41, 59, 94, |
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
public unsafe int FreeFasterSimplifiedAsmAlignedNonTemporalUnrolledUnsafePin(T obj) | |
{ | |
var items = _items; | |
var length = items.Length; | |
var nullVector = Vector256<long>.Zero; | |
fixed (long* addrPtr = &itemsRef[0]) | |
{ | |
var aligned = (long*)(((ulong)addrPtr + 31UL) & ~31UL); | |
var pos = (int)(aligned - addrPtr); | |
for (int w = 0; w < pos; w++) |
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 System.Runtime.Intrinsics; | |
using System.Runtime.Intrinsics.X86; | |
using System.Threading; | |
namespace ObjectPools | |
{ | |
public class FastRefPool<T> where T : class | |
{ |
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.Running; | |
namespace AllocationBenchmark | |
{ | |
[DryCoreJob, DryClrJob] | |
[MemoryDiagnoser] | |
public class FormatAllocation | |
{ | |
[Benchmark] |
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
internal class NoReturn<TReturn, TException> where TException : Exception | |
{ | |
static NoReturn() | |
{ | |
bool GetCorrectConstructor(ParameterInfo[] parameters) => parameters.Length == 1 && parameters[0].ParameterType == typeof(string); | |
var constructors = typeof(TException).GetConstructors(); | |
var target = Expression.Label(); | |
var constructor = constructors.Single(c => GetCorrectConstructor(c.GetParameters())); | |
var messageExpression = Expression.Parameter(typeof(string), "message"); | |
var newException = Expression.New(constructor, messageExpression); |
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.Buffers; | |
using System.IO; | |
using System.Threading.Tasks; | |
using AppKit; | |
using CoreGraphics; | |
using CoreImage; | |
using Foundation; | |
using ImageIO; | |
using MobileCoreServices; |
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
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) | |
{ | |
base.OnActivityResult(requestCode, resultCode, data); | |
// we have a valid GUID, so handle the task | |
if (!string.IsNullOrEmpty(guid) && pendingTasks.TryRemove(guid, out var tcs) && tcs != null) | |
{ | |
if (resultCode == Result.Canceled) | |
{ | |
tcs.TrySetCanceled(); |
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.IO; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Text.Json; | |
using System.Xml; | |
using System.Xml.Linq; |
OlderNewer