https://github.com/frectonz/fcp-vs-bun-cp
Is bun's cp faster than fcp
https://github.com/frectonz/fcp-vs-bun-cp
Last synced: about 2 months ago
JSON representation
Is bun's cp faster than fcp
- Host: GitHub
- URL: https://github.com/frectonz/fcp-vs-bun-cp
- Owner: frectonz
- Created: 2023-09-09T12:53:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-09T18:20:47.000Z (almost 3 years ago)
- Last Synced: 2025-03-03T17:13:44.499Z (over 1 year ago)
- Language: Nix
- Homepage:
- Size: 462 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `fcp` vs `bun cp`
If you have nix installed, this command will install `bun`, `fcp` and `hyperfine`.
```bash
nix develop
```
The test command is this. Don't forget to have a large file in `/tmp/huge`.
```bash
hyperfine "fcp /tmp/huge /tmp/dest" "bun ./cp-r.mjs /tmp/huge /tmp/dest" --prepare="rm -rf /tmp/dest" --warmup=20
```
# Context
This repo was created to test [Jarred Sumner's](https://twitter.com/jarredsumner/status/1697106543920271524) (creator of bun) claim that bun's `cp` implementation is faster than the rust based `fcp` in this [tweet](https://twitter.com/jarredsumner/status/1697106543920271524).
# Sample Runs
`bun` `1.04x` faster than `fcp`

----
`fcp` `1.19x` faster than `bun`

---
`fcp` `1.02x` faster than `bun`

---
`bun` `1.20x` faster than `fcp`

---
`fcp` `1.09x` faster than `bun`

---
`fcp` `1.04x` faster than `bun`
