FSharp.Core, faster
Fsharp.Core, targeting .NET Standard 2.0, without additional dependencies, cannot currently use .NET's Span type, or many vectorization intrinsics to accelerate its core functions. This library aims to provide faster implementations to certain FSharp.Core functions by using these features by targeting a newer version of .NET and dropping support for netstandard2.0
.
All functions are implemented to be drop in replacements for the existing FSharp.Core functions.
FString.replicate
(replaces String.replicate)
Uses Span<char>
and a special overload of String.Create
with a SpanAction
to fill the string. Removes the need for intermediate allocations and copies.
FArray.create
(replaces Array.create)
Uses Span.Fill
instead of looping over the array to fill it.
This is a work in progress, help is appreciated!