Sunday, 5 November 2017

JSON Structural Serialization

The F# Journal just published an article:

"Although serialization libraries are widely available for both .NET and F#, many practical applications stand to benefit enormously from structural serialization because this relaxes the restriction that values must be serialized to the same compiled version of a type. This article looks at the design and implementation of a simple library that serializes values of ML types to and from the JSON format using the FSharp.Data library and our Universal Reflection library (described in a previous article)..."

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!

 


Dr Jon Harrop | Director
Tel: +44 (0)1223 812 300
Email: j.harrop@idtechex.com
IDTechEx Logo

Independent market research, business intelligence and advice
on emerging technologies. See our latest insights at www.IDTechEx.com/research

UK Headquarters: Downing Park, Station Road,
Swaffham Bulbeck, Cambridge, CB25 0NW, UK




 

Monday, 30 October 2017

An optimized Concestor dictionary

The F# Journal just published an article:
"This article looks at some obvious ways to improve the performance of the Concestor dictionary data structure from the previous article. The unoptimized implementation was already 2-3x faster than an F# Map for some applications. This optimized implementation ends up being 4.5-11x faster than an F# Map, which is substantial enough to make this data structure really interesting..."
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, 9 October 2017

A simple Concestor dictionary

The F# Journal just published an article:
"This article describes the natural extension of our Concestor data structure to purely functional dictionaries, equivalent to the built-in F# `Map`. As for sets, we demonstrate substantial performance gains both in microbenchmarks as well as a simple dictionary data compressor..."
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!

Sunday, 8 October 2017

What are the advantages of F# over C#

I just stumbled upon this old Stack Overflow post of mine which has been deleted:

The main advantage of F# over C# is much lower development costs (once your developers are familiar with F#, which will probably only take a few weeks).

From my personal experience I would estimate the productivity boost (= drop in development cost) to be 2-10×. This is strongly dependent upon the application, of course. The best cases for F# are applications requiring dense algorithmics (i.e. hard problems) or DSL implementations. The worse cases for F# are primarily where other languages have better tooling, e.g. GUI designer, WSDL code generator.

I consulted for a London-based company in the finance sector for 15 months and, amongst other things:


  • Implemented in F# in 4 hours a feature that had been scheduled to take 3 months of development in C++.
  • Built in F# in 3 months a server with 100x higher throughput, 100x lower latency and 10x better scalability (number of simultaneous client connections) than their legacy C++.
  • They were training around a dozen F# developers when I left.


I am currently consulting for one of the world's largest insurance companies and my predecessor developed an entire pension quote calculator (typically scheduled to take 300-400 man days) entirely in F# in under 100 days with no prior F# experience at all. Performance is 10× better than the C++ that it replaces because the new code avoids unnecessary copying and exploits multicore parallelism. Part of my job here will be to give basic F# training to around 20 people and bring a few people up to expert level.

The Concestor Set

The F# Journal just published an article:
"A set is an abstract data structure that stores its elements without duplicates and permits efficient insertion, removal and search. The most popular concrete implementation of a set is the hash table but this is an inherently mutable collection. Purely functional sets, including the `Set` collection provided by F#, are based upon balanced trees. This article looks at the design and implementation of a new purely functional set that has very different performance characteristics and, in particular, is much faster in some circumstances..."
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!

Tuesday, 3 October 2017

Creating a new term-rewrite language

The F# Journal just published an article:
"This article walks through the design and implementation of a simple but remarkably powerful new programming language that uses term rewriting as an evaluation model and, consequently, is well suited to computer algebra..."
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, 22 September 2017

Struct tuples

The F# Journal just published an article:
"Almost 10 years ago our own HLVM project demonstrated the potential of struct tuples, showcasing huge performance improvements mainly by alleviating stress on the garbage collector. The latest version of F# in Visual Studio 2017 introduces a new feature called struct tuples that allows tuples to be unboxed. This article takes a look at the characteristics of struct tuples in all of the contexts where one might expect observable differences: generic functions, keys in dictionaries, generation survivors, write barriers and multicore paralellism..."
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!