Skip to content

Instantly share code, notes, and snippets.

@mrange
mrange / fsharp_advent_2016_12_10.md
Last active December 14, 2019 21:44
F# Advent 2016 (English) - December 10 - Implementing a persistent hash map.
@imerchant
imerchant / OptionTypeConverter.fs
Created April 25, 2016 19:16
Json.NET Type Convertor for F# Option<_> support
module OptionTypeConverter
open System
open Microsoft.FSharp.Reflection
open Newtonsoft.Json
// http://gorodinski.com/blog/2013/01/05/json-dot-net-type-converters-for-f-option-list-tuple/
type OptionTypeConverter() =
inherit JsonConverter()
@vbop9834
vbop9834 / MonoFsharpCentos6.sh
Last active June 5, 2017 23:02
Install Fsharp on Centos6
#Set the terminal session with super user privileges
sudo -s
#Install dependencies for compiling code
yum install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
#Download Mono, extract the files, make, and make install
cd /usr/local/src
wget http://download.mono-project.com/sources/mono/mono-5.0.1.1.tar.bz2
tar jxf mono-4.3.2.467.tar.bz2
@jboner
jboner / latency.txt
Last active November 17, 2024 11:32
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD