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
import scala.annotation.tailrec | |
object Main { | |
def main(args: Array[String]) { | |
runFor(Imperative, "Imperative") | |
runFor(functionalOriginal, "functionalOriginal") | |
runFor(functionalView, "functionalView") | |
runFor(functionalRecursive, "functionalRecursive") |
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
sxe ld:mscorlib | |
g | |
.loadby sos clr | |
// .loadby sos mscorwks | |
sxe ld:clrjit | |
// sxe ld:mscorjit | |
g | |
!threads | |
!dumpdomain | |
!dumpdomain 000000a930db1d10 |
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
Empty: 34 items | |
Identity: 25 items | |
Always true: 9 items |
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.Linq; | |
namespace PerformanceProblem | |
{ | |
public class Program | |
{ | |
public static void Main() |
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.Linq; | |
namespace PerformanceProblem | |
{ | |
public class Program | |
{ | |
public static void Main() |
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 Autofac; | |
using Xunit; | |
namespace ClassLibrary1 | |
{ | |
public class Stackoverflow24762539 | |
{ | |
[Fact] | |
public void Repro() |
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
namespace Lib | |
{ | |
public interface Counter { int Count(string s); } | |
public abstract class AbstractClass : AbstractParent | |
{ | |
public abstract int Foo(int x); | |
public virtual int Foo(string s) { return Foo(Counter.Count(s)); } | |
} |
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
public static class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
dynamic a = 1; | |
MethodWithDynamic(a).Extension(); | |
} | |
public static int MethodWithDynamic(dynamic a) | |
{ |
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
public class MeasuredInput | |
{ | |
public string Identifier { get; set; } | |
public int MeasuredValue { get; set; } | |
public double Confidence { get; set; } | |
} | |
public class Measurement | |
{ | |
public Measurement(string primaryId, string secondaryId, int value, double adjustedMeasurement) |
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
public MemoryMapPager(string fileName, FlushMode flushMode = FlushMode.Full) | |
{ | |
_flushMode = flushMode; | |
var fileInfo = new FileInfo(fileName); | |
var fileLength = fileInfo.Length; | |
var isFileEmpty = fileLength == 0 || fileInfo.Exists == false; | |
_fileStream = fileInfo.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read); |