Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. F#
  3. Ply

Ply

MITF#

High-performance Task and ValueTask computation expressions for F# with minimal overhead.

GitHubGitHub
246 stars17 forks0 contributors

What is Ply?

Ply is a high-performance Task Parallel Library (TPL) for F# that provides low-overhead Task and ValueTask abstractions comparable to C# async/await performance. It enables efficient asynchronous programming in F# with a focus on minimizing allocations and execution overhead, aiming to bring C#-like Task performance to F# with minimal abstraction overhead.

Target Audience

F# developers building high-performance asynchronous applications, particularly those who need to minimize garbage collection pressure and achieve performance parity with C# async/await.

Value Proposition

Developers choose Ply over alternatives like TaskBuilder.fs because it offers performance on par with C# async/await, provides specialized builders for different return types and TFMs, and includes unsafe variants for zero-allocation scenarios when async locals or synchronization context changes are not needed.

Overview

High performance System.Threading.(Value)Task computation expressions for F#

Use Cases

Best For

  • Building high-performance asynchronous workflows in F# that require minimal allocation and GC pressure.
  • Migrating C# async/await code to F# while maintaining comparable performance characteristics.
  • Developing libraries or applications where Task and ValueTask abstractions need fine-grained control over execution bubbles for safety and performance.
  • Scenarios requiring zero-allocation asynchronous computation expressions using unsafe builders like uvtask or uply when async locals are not used.
  • Projects targeting multiple TFMs (e.g., netstandard2.0, netcoreapp2.1) with specialized builders for Task<'T>, ValueTask<'T>, Task, and ValueTask return types.
  • Optimizing asynchronous code in F# where benchmarks show Ply outperforms alternatives like TaskBuilder.fs in terms of execution time and memory allocation.

Not Ideal For

  • Applications that rely on async locals or synchronization context changes for correct behavior, such as logging or transaction scopes.
  • Teams seeking a simple, drop-in async library without the complexity of choosing between multiple builders and understanding execution bubbles.
  • Projects targeting only .NET Standard 2.0 where ValueTask builders (like vtask) are unavailable, limiting performance optimizations.

Pros & Cons

Pros

Benchmark-Proven Performance

Benchmarks in the README show Ply matches C# async/await in mean execution time (24.60 us vs 24.59 us) and outperforms TaskBuilder.fs, demonstrating its efficiency.

Low Allocation Builders

Offers builders like vtask with near-zero allocation and unsafe variants like uvtask for zero allocation when tasks are completed, reducing GC pressure as highlighted in the benchmarks.

Flexible Builder Selection

Includes 8 specialized builders for Task, ValueTask, and their unit variants across TFMs like netstandard2.0 and netcoreapp2.1, allowing fine-grained optimization.

Execution Bubble Control

Provides unsafe builders that skip execution bubbles for maximum performance when async locals aren't used, giving developers direct control over safety versus speed trade-offs.

Cons

Complex Builder Ecosystem

With 8 different builders and nuanced use cases detailed in the README table, developers must carefully select the right one, increasing cognitive load and risk of misuse.

Unsafe Variants Risk

Unsafe builders like uvtask skip execution bubbles, which can lead to incorrect behavior if async locals or synchronization contexts are modified, requiring deep async knowledge to use safely.

Incomplete Features

The README mentions an experimental branch and ongoing work to reduce allocations per bind, indicating some optimizations are still in flux and may cause instability.

Frequently Asked Questions

Quick Stats

Stars246
Forks17
Contributors0
Open Issues4
Last commit3 years ago
CreatedSince 2019

Tags

#task-parallel-library#async-programming#dotnet#concurrency#fsharp#computation-expressions#performance

Built With

.
.NET Standard 2.0
F
F#

Included in

F#1.4k
Auto-fetched 1 day ago

Related Projects

HopacHopac

http://hopac.github.io/Hopac/Hopac.html

Stars536
Forks62
Last commit4 years ago
TaskBuilder.fsTaskBuilder.fs

F# computation expression builder for System.Threading.Tasks

Stars235
Forks27
Last commit5 years ago
FSharp.Control.AsyncSeqFSharp.Control.AsyncSeq

Asynchronous sequences for F#

Stars174
Forks54
Last commit22 days ago
FSharp.Control.FusionTasksFSharp.Control.FusionTasks

F# Async workflow <--> .NET Task/ValueTask easy seamless interoperability library.

Stars160
Forks13
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub