Using different flags, they have different flags, right? Different machines also affects it. So, you know, benchmarking might be useless. But we are here to learn how you can run some CLI commands for benchmarking, and what you need to know. Here's how you can do benchmarking on your own using Hyperfine with some flags. You can install this with your Mac, Linux, or Windows with WSL2. And here, we're going to be comparing yarn, the version 4, you have PNPM, NPM, and then bund.
So basically, this is prepare here, this flag prepare means you're going to run a command before we run this install installation. For example, deleting node modules. Warm up means you're going to run it once to get cache and use cache. And then this runs here, dash runs, means how many times you want this to run. Like, for example, 10 or 3. And this is going to take, as you can see here, meaning there will be like 10 yarn install, 10 PNPM install, 10 NPM install, et cetera. And it will just get the average of it. But you can just use one if you want to really do it quickly. I'm going to do demo here. And actually, I've run it already. As you can see, bond, NPM, NPM, here are how long it took for NPM to complete it, bond, NPM, yarn. And then you got this summary. Normally, the one will be the winner here on top and then comparing it to the rest. For example here, bond, one. So it says here bond install run 3.73 times faster than yarn, 3.8 times faster than NPM, and then 4.93 times faster than NPM. What are these libraries? So this is just here, a medium size JavaScript application.
So that's how you going to do it. And this will be actually, this repo is public. You will see it later. And you can check and copy things here. And then I put everything here like how to get started with hyperfine, what tools you need, what should be installed in your machine. So bond, it's fast. But what are the things that we can do with this package manager? I will just show you a few things from bonds package manager. You have this bond install, add, remove, update, link.
Comments