This blog created for F# Advent 2016 (English)
Full source code can be found here
- 2016-12-10
- New performance test - Anthony Lloyd (@AnthonyLloyd) suggested that I compare against Prime.Vmap.
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 |
#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 |
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() |
This blog created for F# Advent 2016 (English)
Full source code can be found here