https://github.com/switcherapi/client-js-benchmark
Evaluate performance of 4 different Feature Flag SDKs for JS
https://github.com/switcherapi/client-js-benchmark
deno feature-flags js switcherapi
Last synced: 7 months ago
JSON representation
Evaluate performance of 4 different Feature Flag SDKs for JS
- Host: GitHub
- URL: https://github.com/switcherapi/client-js-benchmark
- Owner: switcherapi
- Created: 2025-07-05T21:36:59.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-07-12T02:08:03.000Z (7 months ago)
- Last Synced: 2025-07-12T04:16:09.121Z (7 months ago)
- Topics: deno, feature-flags, js, switcherapi
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
This benchmark compares major Feature Flag SDKs against Switcher Client SDK for JS & Deno.
Tests included in this benchmark are focused only on avarage performance and do not reflect nor measure any other specific SDK capabilities.
The goal is to gain more knowledge and define a baseline to improve Switcher Client SDK overall performance in the future releases.
## Run
Run the benchmark using Deno task runner. Make sure you have Deno installed and configured in your environment.
```
deno task bench
```
## Tests explained
Tests results are subject to change based on the environment and configuration.
### Async
Uses Promise-based evaluation with in-memory cache by preloading or using async calls to remote API.
### Local
Uses synchronous evaluation with in-memory static configuration loaded from a file or remote API.
### Results
Results are based on the average time per iteration and the number of iterations per second.
| Benchmark | Time/Iter (avg) | Iter/s | (min … max) | p75 | p99 | p995 |
| ------------------------------------- | --------------: | ------------: | --------------------: | -------: | -------: | -------: |
| Static boolean (baseline) | 2.3 ns | 441,300,000 | ( 2.2 ns … 24.4 ns) | 2.3 ns | 2.9 ns | 3.5 ns |
| Client: switcher-client-deno (local) | 10.6 ns | 94,470,000 | ( 9.6 ns … 33.1 ns) | 10.5 ns | 14.6 ns | 15.6 ns |
| Client: switcher-client-js (local) | 10.7 ns | 93,770,000 | ( 9.6 ns … 50.5 ns) | 10.6 ns | 15.1 ns | 16.4 ns |
| Client: unleash (local) | 61.5 ns | 16,250,000 | ( 52.6 ns … 111.0 ns) | 62.8 ns | 88.9 ns | 91.4 ns |
| Client: switcher-client-deno (async) | 126.3 ns | 7,920,000 | (112.7 ns … 182.1 ns) | 131.2 ns | 165.2 ns | 171.1 ns |
| Client: switcher-client-js (async) | 130.8 ns | 7,643,000 | (116.6 ns … 358.2 ns) | 135.7 ns | 177.2 ns | 186.9 ns |
| Client: harness (async) | 319.9 ns | 3,126,000 | (288.1 ns … 389.6 ns) | 330.7 ns | 368.0 ns | 389.6 ns |
| Client: optimizely (local) | 1.4 µs | 690,900 | ( 1.4 µs … 2.1 µs) | 1.5 µs | 2.1 µs | 2.1 µs |