Skip to content

Instantly share code, notes, and snippets.

@cloudRoutine
cloudRoutine / fsharp_advent_2016_12_10.md
Created Dec 18, 2018 — forked from mrange/fsharp_advent_2016_12_10.md
F# Advent 2016 (English) - December 10 - Implementing a persistent hash map.
View fsharp_advent_2016_12_10.md
@cloudRoutine
cloudRoutine / optimizing_performance.md
Created Oct 12, 2016 — forked from mrange/optimizing_performance.md
Optimizing a simple problem in F# and C++
View optimizing_performance.md

Optimizing a simple problem

I was introduced to a simple optimization problem by one of my interns last week. He was about to participate in a friendly competition where they were asked to find a performant solution to the problem:

The problem

View json_transform.md
View countby performance.fsx
open System.Diagnostics
open System.Reflection
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.Operators
open Microsoft.FSharp.Core.LanguagePrimitives
open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Primitives.Basics
open System.Collections.Generic
View TryGetExt.fsx
[<System.Runtime.CompilerServices.Extension>]
type ExtensionMethods() =
[<System.Runtime.CompilerServices.Extension>]
static member inline GetOption< ^a,'k,'v when 'a : (member TryGetValue : 'k * ('v byref) -> bool)>(this : ^a, key : 'k) =
let mutable v = Unchecked.defaultof<'v>
let scc = ( ^a : (member TryGetValue : 'k * ('v byref) -> bool) this, key, &v)
if scc then
Some v
else
None
View ndc-london-recordings.txt
Capability Red - Requirements at Scale by Liz Keogh
http://www.ndcvideos.com/#/app/video/2111
----
Beyond Rectangles in Web Design - CSS Shapes and CSS Masking by Razvan Caliman
http://www.ndcvideos.com/#/app/video/2121
----
Coding Culture by Sven Peters
http://www.ndcvideos.com/#/app/video/2131
----
The Ultimate Logging Architecture - You KNOW You Want It by Michele Leroux Bustamante