https://github.com/hazae41/deimos
Modern and minimalist benchmarking library for the web
https://github.com/hazae41/deimos
asynchronous benchmark benchmarking browser deno fast javascript minimalist node runner speedtest typescript
Last synced: about 2 months ago
JSON representation
Modern and minimalist benchmarking library for the web
- Host: GitHub
- URL: https://github.com/hazae41/deimos
- Owner: hazae41
- License: mit
- Created: 2023-01-11T18:01:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-09-24T09:51:33.000Z (9 months ago)
- Last Synced: 2025-09-24T11:33:05.912Z (9 months ago)
- Topics: asynchronous, benchmark, benchmarking, browser, deno, fast, javascript, minimalist, node, runner, speedtest, typescript
- Language: TypeScript
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
Modern and minimalist benchmarking library
```bash
npm install @hazae41/deimos
```
```bash
deno install jsr:@hazae41/deimos
```
[**📦 NPM**](https://www.npmjs.com/package/@hazae41/deimos) • [**📦 JSR**](https://jsr.io/@hazae41/deimos)
## Philosophy 🧠
Deimos aims to be minimalist and to always work no matter the:
- runtime (Node, Deno, browser)
- module resolution (ESM, CommonJS)
- language (TypeScript, JavaScript)
- bundler (Rollup, Vite)
It's just a library you can import everywhere! That's it, no CLI, no configuration file, just JavaScript.
## Features 🔥
### Current features
- 100% TypeScript and ESM
- No external dependency
- Runnable in the browser
## Usage 🚀
```typescript
import { bench } from "@hazae41/deimos"
const a = await bench("my library", async () => {
await compute()
})
const b = await bench("some other library", async () => {
await compute2()
})
a.tableAndSummary(b)
console.log(`${a.name} is ${a.ratio(b)} times faster than ${b.name}`)
```
## Running 🏎️
#### Node
```bash
node --test --test-concurrency=1 ./out/**/*.bench.js
```
#### Deno
```bash
deno test ./src/**/*.bench.ts
```
#### Other
```typescript
await import("./mymodule.bench.ts")
```