Thursday, 18 May 2017

Random access lists

The F# Journal just published an article:

"Ordinary F# lists are singly-linked immutable lists that permit constant-time prepend and decapitate but counting the length and random access are linear time. This article looks at an alternative data structure, a form of random access list, that is based upon a tree rather than a list in order to provide logarithmic complexity for many operations..."

If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Monday, 1 May 2017

F# vs OCaml performance: the Boyer benchmark

The F# Journal just published an article:

"The OCaml compiler contains a benchmark suite that includes several different heavily-symbolic benchmarks. Symbolic programs are the one use case that OCaml was designed for and has been optimised at for over two decades. This article ports OCaml's Boyer benchmark to F#, looks at optimisations and concludes that the parallelized F# solution is 3x faster than the original OCaml..."

If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Thursday, 30 March 2017

Balanced search trees: weight-balanced trees

The F# Journal just published an article:

"This article continues our series about balanced search trees by covering weight balanced trees. This data structure can be remarkably simple and performance is good enough for many applications, making it an ideal pedagogical example that can be used to teach general tree-based techniques. Furthermore, this data structure allows some operations to be implemented asymptotically more efficiently than most other search trees including the AVL trees used inside the F# `Set` and `Map` modules..."

If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Monday, 27 March 2017

Balanced search trees: AA trees

The F# Journal just published an article:

"This is the second article in a series about balanced search trees. This article takes a look at a purely functional implementation of the AA tree data structure as described by Arne Andersson in the paper "Balanced Search Trees Made Simple". In particular, the brevity of our implementation is compared to that of the full red-black tree detailed in the previous article. In this case we test not only the externally-visible effects of the collection but also its invariants..."

If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Friday, 24 March 2017

Balanced search trees: red-black trees

The F# Journal just published an article:

"This is the first article in a series about balanced search trees. There are many different kinds of balanced trees. This article takes a look at a very popular data structure called red-black trees. In particular, we go further than many other texts on purely functional red-black trees by including a delete operation that removes an element from a tree..."

If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Wednesday, 15 March 2017

Playing with polynomials: part 1

The F# Journal just published an article:

"This series of articles look at the design and implementation of a simple library that allows polynomials to be represented and manipulated using arithmetic operators. Various internal representations are examined including their performance. Interestingly, impure internal representations prove to have competitive performance even though they do not support incremental operations. The implications of this observation for purely functional data structures are discussed..."

If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Wednesday, 8 March 2017

Investigating GC pause times

The F# Journal just published an article:

"Garbage collection pauses can be irritating and in some cases even a show-stopping problem. This article uses a little F# script to measure the pause times caused by the .NET GC and then visualize them using our F# for Visualization library. This allows the profile to be examined interactively quickly and easily. The results for a variety of circumstances are charted and discussed in detail..."

If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!