Skip to content

Commit f7ce0f5

Browse files
authored
Update benchmarks (again) (#1586)
1 parent b0d2bb2 commit f7ce0f5

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

docs/openapi-fetch/index.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ title: openapi-fetch
66

77
openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Weighs **5 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
88

9-
| Library | Size (min) | “GET” request |
9+
| Library | Size (min) | “GET” request\* |
1010
| :------------------------- | ---------: | :------------------------- |
11-
| openapi-fetch | `5 kB` | `278k` ops/s (fastest) |
12-
| openapi-typescript-fetch | `4 kB` | `130k` ops/s (2.1× slower) |
13-
| axios | `32 kB` | `217k` ops/s (1.3× slower) |
14-
| superagent | `55 kB` | `63k` ops/s (4.4× slower) |
15-
| openapi-typescript-codegen | `367 kB` | `106k` ops/s (2.6× slower) |
11+
| openapi-fetch | `5 kB` | `300k` ops/s (fastest) |
12+
| openapi-typescript-fetch | `4 kB` | `150k` ops/s (2× slower) |
13+
| axios | `32 kB` | `225k` ops/s (1.3× slower) |
14+
| superagent | `55 kB` | `50k` ops/s (6× slower) |
15+
| openapi-typescript-codegen | `367 kB` | `100k` ops/s (3× slower) |
16+
17+
_\* [Benchmarks are approximate](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-fetch/test/index.bench.js) to just show rough baseline and will differ among machines and browsers. The relative performance between libraries is more reliable._
1618

1719
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 5 kb package.
1820

packages/openapi-fetch/README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Weighs **4 kB** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
44

5-
| Library | Size (min) | “GET” request |
5+
| Library | Size (min) | “GET” request\* |
66
| :------------------------- | ---------: | :------------------------- |
7-
| openapi-fetch | `5 kB` | `278k` ops/s (fastest) |
8-
| openapi-typescript-fetch | `4 kB` | `130k` ops/s (2.1× slower) |
9-
| axios | `32 kB` | `217k` ops/s (1.3× slower) |
10-
| superagent | `55 kB` | `63k` ops/s (4.4× slower) |
11-
| openapi-typescript-codegen | `367 kB` | `106k` ops/s (2.6× slower) |
7+
| openapi-fetch | `5 kB` | `300k` ops/s (fastest) |
8+
| openapi-typescript-fetch | `4 kB` | `150k` ops/s (2× slower) |
9+
| axios | `32 kB` | `225k` ops/s (1.3× slower) |
10+
| superagent | `55 kB` | `50k` ops/s (6× slower) |
11+
| openapi-typescript-codegen | `367 kB` | `100k` ops/s (3× slower) |
12+
13+
_\* [Benchmarks are approximate](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-fetch/test/index.bench.js) to just show rough baseline and will differ among machines and browsers. The relative performance between libraries is more reliable._
1214

1315
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 2 kB package.
1416

0 commit comments

Comments
 (0)