Skip to content

Commit

Permalink
docs: update performance result
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMiyauci committed Apr 10, 2024
1 parent cfe34be commit 1a4eb1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions docs/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ Snapshot:

```bash
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
runtime: deno 1.34.3 (x86_64-apple-darwin)
runtime: deno 1.42.1 (x86_64-apple-darwin)

benchmark time (avg) (min … max) p75 p99 p995
---------------------------------------------------------------- -----------------------------
format@latest 2.21 µs/iter (2 µs … 3.16 µs) 2.27 µs 3.16 µs 3.16 µs
[email protected]/fmt::sprintf 9.33 µs/iter (7.62 µs … 261.12 µs) 8.45 µs 28.46 µs 53.34 µs
file:///Users/tomoki/Projects/format/format_bench.ts
benchmark time (avg) iter/s (min … max) p75 p99 p995
------------------------------------------------------------------------------ -----------------------------

group multiple parameter with long string
format@latest 2.17 µs/iter 460,296.1 (2.04 µs … 3.13 µs) 2.16 µs 3.13 µs 3.13 µs
[email protected]/fmt::sprintf 9.06 µs/iter 110,363.1 (7.81 µs … 338.19 µs) 8.42 µs 23.19 µs 38.42 µs

summary
format@latest
4.23x faster than std@0.190.0/fmt::sprintf
4.17x faster than std@0.221.0/fmt::sprintf
```

## Bundle size
Expand Down
2 changes: 1 addition & 1 deletion format_bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Deno.bench(
},
);

Deno.bench("std@0.190.0/fmt::sprintf", { group }, () => {
Deno.bench("std@0.221.0/fmt::sprintf", { group }, () => {
assertEquals(
sprintf(
Template.Std,
Expand Down

0 comments on commit 1a4eb1c

Please sign in to comment.