Skip to content

Performance

Updated: 2026-07-18
ActualLab.Fusion Version: 14.0.17

This page summarizes results of Fusion performance benchmarks.

Test Environment

ComponentSpecification
CPUAMD Ryzen 9 9950X3D 16-Core Processor
RAM96 GB DDR5
OSWindows 11
.NET10.0.8

Note that Ryzen 9 9950X3D has 32 logical cores due to SMT.

Fusion Micro-Benchmarks

BenchmarkDotNet measurements of the single-threaded, per-operation cost of Fusion's core compute-method primitives, with an otherwise empty method body (so the numbers reflect Fusion's own overhead). Calls/s per core = 1 / Mean.

OperationCalls/s per coreMeanAllocated
Cached hit, long key
Service.Get(0L, default)
50.68M19.73 ns32 B
Cached hit, string key
Service.Get("key", default)
34.90M28.65 ns32 B
Invalidation (activate + 1 call)
using (Invalidation.Begin())
Service.Get(key, default)
18.77M53.28 ns112 B
Recompute + cache (fresh key each call)
Service.Get(i++, default)
2.04M490.1 ns1007 B

A cache hit costs ~20 ns and a single ArgumentList allocation — this is the ~50M calls/s per core that Fusion sustains for cached compute-method calls.

Interception & Proxy Overhead

Fusion builds compute methods and RPC clients on generated proxies. Per-call cost of ActualLab's proxies vs Castle DynamicProxy for a simple interceptor (returns the method's default result), single-threaded:

Proxy variantCalls/s per coreMeanAllocated
No proxy (direct virtual call)763.7M1.31 ns
ActualLab, simple interceptor386.0M2.59 ns24 B
Castle DynamicProxy, simple61.94M16.15 ns128 B

ActualLab's interception is ~5-7x faster than Castle DynamicProxy — and only ~2-3x slower than a plain virtual call — while allocating far less. That's why Fusion can afford to wrap every compute method and RPC call in a proxy. See the full breakdown (sync/async, pass-through, no-handler variants) in the source report linked at the bottom of this page.

Run-PerformanceTest.cmd from Fusion Test suite

The benchmark measures throughput of a simple repository-style user lookup service (UserService.Get(userId)) that retrieves user records from a database. The test compares two scenarios:

  1. With Fusion: UserService.Get is a [ComputeMethod], so its results are cached, and thus a majority of database calls are avoided (unless they happen right after a mutation).

  2. Without Fusion: UserService.Get is a regular method, so every call to it executes a simple SQL query.

Test Scenarios

  • Multiple readers, 1 mutator: Simulates a realistic high-intensity workload with ~640 concurrent reader tasks (20 per CPU core) performing lookups, while a single mutator task periodically updates random user records. This tests how well Fusion handles cache invalidation under concurrent load.

  • Single reader, no mutators: A single task performs sequential lookups with no concurrent mutations. This measures the peak lookup throughput per CPU core.

The test uses a pool of 1,000 pre-populated user records. Each run performs multiple iterations, and the best result from 3 runs is reported.

Multiple Readers + 1 Mutator (all cores)

TestSQLitePostgreSQL
Without Fusion155.68K calls/s38.61K calls/s
With Fusion498.92M calls/s533.85M calls/s
Speedup3,205x13,827x

Single Reader, No Mutators

TestSQLitePostgreSQL
Without Fusion55.70K calls/s1.78K calls/s
With Fusion26.77M calls/s26.74M calls/s
Speedup481x15,022x

Key Observations

  • With Fusion + concurrent readers: ~500M calls/s regardless of the database, because most calls are served from Fusion's in-memory cache. That's roughly 13,800x faster than direct PostgreSQL access and 3,200x faster than direct SQLite access under the same concurrent load.

  • Without Fusion: Performance is entirely database-bound. SQLite (in-process) outperforms PostgreSQL (network round-trip) significantly, especially for single-threaded access.

  • Concurrent access amplifies the difference: With many readers, Fusion's lock-free cache scales linearly with CPU cores, while database access becomes the bottleneck.

Benchmark.cmd from ActualLab.Fusion.Samples

The benchmark measures throughput of a simple repository-style user lookup service that retrieves and updates user records from a database: UserService.Get(userId) and Update(userId, ...).

Local Services

TestResultSpeedup
Regular Service171.05K calls/s
Fusion Service344.98M calls/s~2,017x

Remote Services

TestResultSpeedup
HTTP Client → Regular Service102.82K calls/s
HTTP Client → Fusion Service304.87K calls/s~3.0x
ActualLab.Rpc Client → Fusion Service7.82M calls/s~76x
Fusion Client → Fusion Service230.16M calls/s~2,239x

Wondering what each of these scenarios means (HTTP vs ActualLab.Rpc vs Fusion client)? See What each scenario means in the source report.

RpcBenchmark.cmd from ActualLab.Fusion.Samples

This benchmark compares ActualLab.Rpc with gRPC, SignalR, and other RPC frameworks. The tables below include only ActualLab.Rpc, gRPC, and SignalR. Other options, such as StreamJsonRpc and RESTful API, are way slower, so we omit them.

Calls

TestActualLab.RpcgRPCSignalRSpeedup
Sum9.91M calls/s1.28M calls/s4.85M calls/s2.0..7.7x
GetUser8.75M calls/s1.24M calls/s4.05M calls/s2.2..7.1x
SayHello6.04M calls/s1.16M calls/s2.16M calls/s2.8..5.2x

Streams

TestActualLab.RpcgRPCSignalRSpeedup
Stream199.96M items/s43.78M items/s17.97M items/s2.3..5.6x
Stream10044.89M items/s25.87M items/s13.90M items/s1.7..3.2x
Stream10K807.84K items/s572.76K items/s432.00K items/s1.4..1.9x

Test names indicate item size: Stream1 = 1-byte items, Stream100 = 100-byte items, Stream10K = 10KB items.

Throughput (items/s × item size)

TestActualLab.RpcgRPCSignalR
Stream199.96 MB/s43.78 MB/s17.97 MB/s
Stream1004.49 GB/s2.59 GB/s1.39 GB/s
Stream10K8.27 GB/s5.86 GB/s4.42 GB/s

Docker-Based RPC Benchmarks

These benchmarks run in Docker containers with CPU limits to measure 4-core server performance. The server container is limited to 4 CPUs while client containers have 24 CPUs available, ensuring the server is the bottleneck. This setup matches grpc_bench, SayHello w/ gRPC is identical to what grpc_bench measures.

External cross-check. grpc_bench's own .NET gRPC result on an i9-13900KF @ 5.5 GHz (4-CPU server — a desktop CPU with per-core throughput close to the 9950X3D) is ~402K req/s, essentially identical to our SayHello gRPC figure of 399.32K below. Same library (grpc-dotnet), same 4-CPU setup — which confirms our gRPC numbers are measured fairly. gRPC-dotnet is the fastest framework in that grpc_bench run, and ActualLab.Rpc's SayHello (2.52M) is still ~6.3× faster than it.

Docker Calls

FrameworkSumGetUserSayHello
ActualLab.Rpc4.77M calls/s4.38M calls/s2.52M calls/s
SignalR2.38M calls/s1.94M calls/s862.07K calls/s
gRPC437.85K calls/s441.44K calls/s399.32K calls/s
MagicOnion392.59K calls/s402.85K calls/s362.84K calls/s
StreamJsonRpc279.62K calls/s231.86K calls/s99.09K calls/s
HTTP105.25K calls/s103.12K calls/s88.18K calls/s

Docker Streams

Test names indicate item size: Stream1 = 1-byte items, Stream100 = 100-byte items, Stream10K = 10KB items.

FrameworkStream1Stream100Stream10K
ActualLab.Rpc35.17M items/s12.97M items/s279.72K items/s
gRPC11.79M items/s6.19M items/s140.40K items/s
SignalR8.89M items/s5.08M items/s106.20K items/s
StreamJsonRpc120.96K items/s120.96K items/s60.48K items/s

Reference: Redis Benchmark

Reference benchmark using redis-benchmark tool on the same machine (500K requests, best of 5 runs). Optimal client count (12) was determined via binary search over 1-1000 range.

OperationResult
PING_INLINE231.59K req/s
GET229.25K req/s
SET229.67K req/s

More details: these numbers come from the benchmark report in ActualLab.Fusion.Samples, which also lists the exact commands, additional frameworks, and the full interception/microbenchmark breakdown: Benchmarks.md.