Skip to content

Instantly share code, notes, and snippets.

Everything I Ever Learned About JVM Performance Tuning @Twitter- by Attila Szegedi
http://www.infoq.com/presentations/JVM-Performance-Tuning-twitter (video & slides)
9 Fallacies of Java Performance - by Ben Evans
http://www.infoq.com/articles/9_Fallacies_Java_Performance (video & slides)
Visualizing Java GC - by Ben Evans
http://www.infoq.com/presentations/Visualizing-Java-GC (video & slides)
namespace BloomFilter
{
using System;
using System.Collections;
/// <summary>
/// Bloom filter.
/// </summary>
/// <typeparam name="T">Item type </typeparam>
public class Filter<T>
vb6 vba vb homework grails coldfusion flash iphone air sifr ms-access db2 vbscript perl sap jpa gql java-ee magento ipad qt weblogic blackberry gwt pentaho wordpress mac corba intellij-idea lucene safari seo redis itouch ant antlr ada gtk doctrine lotus tomcat jcl mongodb netlogo nosql smalltalk beamer spring symbian agile firebird samba jasper-reports sybase fortran qtp itunes sqlite soapui acrobat actionscript* flex* cocoa* struts* ruby* zend* *php* java-* joomla* maven* *hibernate* ipod* xcode* jboss* dotnetnuke* *facebook* java groovy* *jaxb* kanban iphone* telerik osx python* jsf* jquery* r latex oracle* android* devexpress umbraco* wolfram-mathematica awk sed *dreamweaver* symfony* crystal-reports* alfresco *postgres* dojo* codeigniter* xbap oscommerce cucumber mod-rewrite mysql* jpa* extjs semantic-web kohana* django* sqlalchemy cufon birt .htaccess inno-setup jira drupal* postscript swf* automapper ssas jms asterisk amazon-ecs ios* delphi* labview jvm* *payment* *dynamics* yahoo-pipes websphere* siebe
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, CoreCLR!");
}
}
@mattwarren
mattwarren / Action.il
Last active August 29, 2015 14:16 — forked from svick/Action.il
.assembly ActionTest {}
.assembly extern mscorlib
{
.ver 4:0:0:0
.publickeytoken = (B7 7A 5C 56 19 34 E0 89)
}
.namespace Test
{
@mattwarren
mattwarren / Test.cs
Last active August 29, 2015 14:19 — forked from leppie/Test.cs
using System;
using System.Reflection.Emit;
class Program
{
delegate object FuncObjectObject(Object o);
static void Main(string[] args)
{
var dm = new DynamicMethod("", typeof(object), new [] { typeof(object) });
@mattwarren
mattwarren / evil.cs
Last active August 29, 2015 14:22 — forked from vcsjones/evil.cs
private static void ChangeToReturnFalse(MethodInfo methodInfo)
{
var intPtrConstructor = typeof(IntPtr).GetConstructor(new[] { typeof(void*) });
var method = new DynamicMethod("ChangeToReturnFalse", typeof(IntPtr), Type.EmptyTypes, typeof(ServiceLocationModule));
var generator = method.GetILGenerator();
generator.Emit(OpCodes.Ldftn, methodInfo);
generator.Emit(OpCodes.Newobj, intPtrConstructor);
generator.Emit(OpCodes.Ret);
var addressFunctor = (Func<IntPtr>)method.CreateDelegate(typeof(Func<IntPtr>));
var address = addressFunctor();
using System;
using System.Reflection;
using System.Reflection.Emit;
namespace ConsoleApplication3.Test
{
static class EntityPtr
{
private static readonly IEntityPtr converter = CreateConverter();
@mattwarren
mattwarren / stackalloc-benchmark.cs
Last active September 2, 2015 13:50 — forked from goldshtn/stackalloc-benchmark.cs
Benchmark for comparing stackalloc to heap allocations for small, medium, and large arrays.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StackAllocVsHeapAlloc
{
public static class Sandbox
@mattwarren
mattwarren / ObjectPool.cs
Created January 13, 2016 14:33 — forked from benaadams/ObjectPool.cs
Object Pools
public interface IObjectPool<T>
{
T Rent();
void Return(T obj);
}
public interface IResetable
{
void Reset();
}