Skip to content

Commit

Permalink
docs: clarify methodology behind benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed Jul 23, 2021
1 parent ce14c01 commit 17abc54
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
| Method | `text-interop` | `list-render` | `conditional-render` |
| ----------- | ------------------------ | ---------------------- | ------------------------- |
| million | 1,275,852 ops/sec ±6.33% | 12,262 ops/sec ±8.60% | 1,013,634 ops/sec ±11.69% |
| virtual-dom | 341,239 ops/sec ±5.09% | 8,466 ops/sec ±4.18% | 356,429 ops/sec ±6.03% |
| vanilla | 24,974 ops/sec ±9.21% | 3,417 ops/sec ±8.91% | 19,306 ops/sec ±11.23% |
| baseline | 1,264,249 ops/sec ±7.34% | 13,216 ops/sec ±11.83% | 1,027,381 ops/sec ±8.00% |

_Last taken 6/13/2021_
# Benchmarks

The intention of these benchmarks are not to convince you that Million is faster that all libraries, but rather bring perspective on the results of a specific method of testing DOM manipulation implementations when compared to each other.

Implementation may differ, as the goal of the benchmarks is to acheive the same function <u>for the end user</u>.

| Method | `text-interop` | `list-render` | `conditional-render` |
| -------------------- | ------------------------ | ---------------------- | ------------------------- |
| million | 1,275,852 ops/sec ±6.33% | 12,262 ops/sec ±8.60% | 1,013,634 ops/sec ±11.69% |
| virtual-dom | 341,239 ops/sec ±5.09% | 8,466 ops/sec ±4.18% | 356,429 ops/sec ±6.03% |
| vanilla<sup>1</sup> | 24,974 ops/sec ±9.21% | 3,417 ops/sec ±8.91% | 19,306 ops/sec ±11.23% |
| baseline<sup>2</sup> | 1,264,249 ops/sec ±7.34% | 13,216 ops/sec ±11.83% | 1,027,381 ops/sec ±8.00% |

1. An implementation the average developer would make when writing just JavaScript
2. The most optimal imperative solution

Tested on Macbook M1 16 GB, macOS Version 12.0 (Build 21A5268h), Chrome 91.0.4472.164 (Official Build) (arm64)

_Results last taken 1:04 PM PST, 7/23/2021. Results may differ from the main implementation, and will most likely keep differing based on the elapsed time_

[**→ Click to test benchmarks live**](https://million-benchmarks.netlify.app/)

0 comments on commit 17abc54

Please sign in to comment.