Skip to content

albert-du/FastSharpCore

Repository files navigation

FastSharpCore

FSharp.Core, faster

Why?

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.

Implemented:

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.

Source Benchmarks

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!

About

FSharp.Core, faster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages