https://github.com/dancastillo/string-comparison-benchmark
https://github.com/dancastillo/string-comparison-benchmark
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dancastillo/string-comparison-benchmark
- Owner: dancastillo
- Created: 2024-06-07T02:21:45.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-07T02:57:05.000Z (12 months ago)
- Last Synced: 2025-01-20T17:50:45.646Z (4 months ago)
- Language: JavaScript
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# String Comparison Benchmark
String comparison benchmark for method lookup
---
## Requirements
You will only need [Node.js](https://github.com/nodejs/node) and [hyperfine](https://github.com/sharkdp/hyperfine) optional
### Installation
- #### Node installation
Follow instruction [here](https://nodejs.org/en/download/package-manager)
- #### hyperfine installation
```bash
$ brew install hyperfine
```## Usage
```bash
$ git clone https://github.com/dancastillo/string-comparison-benchmark
$ cd string-comparison-benchmark
```## Running tests
Run and print out console.time for each method
```bash
$ npm run compare:test
```Run with hyperfine
```bash
$ npm run compare:hyperfine
```## Results
Results with `npm run compare:test`
Winner: `set`

Results with `npm run compare:hyperfine`
Winner: `switch`
