Hyperfine: The BEST Way To Benchmark CLI Tools

  Рет қаралды 2,385

Brodie Robertson

Brodie Robertson

Күн бұрын

Пікірлер: 35
@AnzanHoshinRoshi
@AnzanHoshinRoshi 3 жыл бұрын
Thank you, Brodie. It's so wonderful to find so often that someone already had the same itch and that there's already a tool to scratch it.
@ricowallaby
@ricowallaby 3 жыл бұрын
Hey Brodie it would be nice if you did a video on "nushell" a shell written in Rust, cheers mate!
@siddharthbhandari2680
@siddharthbhandari2680 3 жыл бұрын
I second this
@magnusanderson6681
@magnusanderson6681 3 жыл бұрын
Awesome video! I wrote a shell script to do a really crappy version of this a while back. Glad to see there are tools out there already for it, and this one seems to be very easy to use.
@davidgomez79
@davidgomez79 3 жыл бұрын
Perfect timing I needed to decide to either use thumb or arm mode for something I was working on. This will help settle it. 👍
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
I have no idea what that means in context but glad it helps
@davidgomez79
@davidgomez79 3 жыл бұрын
@@BrodieRobertson arm cpus have two modes. Thumb mode which is generally slower but the instructions are half the size potentially cutting the size of ur program size in half.
@armynyus9123
@armynyus9123 3 жыл бұрын
Pretty cool tool. From now on "Perf Analysis" will be chapter one in my documentations (misleading the reader into thinking I'd know what I'm doing:-) )
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
Perfect, include numbers for the sake of numbers
@robd.2466
@robd.2466 3 жыл бұрын
i've been using the "time" command for this. if i want averages, i would 'time' in loops.. always nice to check out new programs though
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
That's always a simple way but I was lazy and didn't want to handle calculating averages
@GrumpyCrash
@GrumpyCrash 3 жыл бұрын
"Back in the days" (like ~1995) with Pentium MMX, 8M RAM and ATI Mach 64 with 4 MB VRAM *everyone* bloats his X11 up with Java-GUIs, animated menus/apps, 3D-screensavers, a gui for $random-cli-tool and whatever. And now.. workstations with 16G RAM, 4-Core-CPUs and min. 1T discs like "Hey look.. this patch makes my terminal fast. It now starts in 0.4ms!!! Well.. i dont need it and i dont feel it but hey..!!!11 Everything else is fucking bloat!!!!11!".
@Neucher
@Neucher 3 жыл бұрын
If you care so much about performance why don't you run Gentoo ? Like sure the bigger programs take a bit to compile but it's pretty manageable on modern cpus. Also you don't have to compile everything.
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
I don't care that little
@Neucher
@Neucher 3 жыл бұрын
@@BrodieRobertson Why not debloat your brain then ?
@magnusanderson6681
@magnusanderson6681 3 жыл бұрын
​@@Neucher Dude what? This is such a stupid argument to make. > If you ever wonder how fast a program runs on your computer, you should just distro hop to gentoo lolo cause you're definitely addicted to microoptimizations I mean I am addicted to microoptimizations and this is still a dumb argument
@gardenapple
@gardenapple 3 жыл бұрын
9:25 correct me if I'm wrong, but I think if Exa is written in Rust then it doesn't matter what shell it runs in.
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
There is still a minor overhead in launching the app with the shell
@sharkdp
@sharkdp 3 жыл бұрын
@@BrodieRobertson Author of hyperfine here. Thank you for the nice introduction video! Note that hyperfine actually subtracts the shell startup time. What hyperfine does before every benchmark is a short calibration phase where it runs the specified shell with an empty command. It does this a few times and computes the average shell startup time. This time is subsequently subtracted from every benchmark time. So you should actually see the same runtime when benchmarking exa with dash or zsh. And in fact, you do. It's 1.0 ± 0.4 ms in both cases. The reason we provide the `--shell` option is that you can also benchmark shell commands. Something like a shell for-loop. In this case, it makes sense to compare different shells. Another thing to note: If you provide `--shell` multiple times, you are not actually running the benchmarks with two different shells! Later `--shell` options will overwrite previous ones. The reason we allow for this is that users might want to set something like `alias hyperfine="hyperfine --shell /bin/dash"`, but then occasionally use another shell.
@minhajsixbyte
@minhajsixbyte 3 жыл бұрын
cool tool
@AcidiFy574
@AcidiFy574 3 жыл бұрын
I never thought about this seriously, but what's the difference between:- *AGPL *LGPL *GPLv2 *GPLv3 -> Licenses??? Also, @BrodieRobertson Remember, I was talking about "HakuNeko" as a desktop manga reader, well there's a new kid on the block "TachiDesk"
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
There is a really good article on the Gnu website about this I believe, or it might be the fsf website
@thingsiplay
@thingsiplay 3 жыл бұрын
Yeah I suggest you to read that mentioned article. But just for the basic overview idea: - GPL is the main license which made open source so popular and many programs are licensed under (in example Linux). It basically forces any program that wants to use its source code in their source code to be open source as well. - GPLv2 is the predecessor to GPLv3 (you probably guessed it already). I am not 100% familiar with the differences, as I only read v2. I know that many people don't like v3, but forgot the reasons. So it is wise if you lookup better sources than KZbin comments. :D - LGPL is basically like GPL but a less restricted version. The L stands for "Lesser" or later renamed to "Library". And I believe it allows for better compatibility with non GPL compatible licenses. You don't need to release the source code of your program, if you just "link" to a library with LGPL license. - AGPL is new to me.
@hackintoshmatrix5321
@hackintoshmatrix5321 3 жыл бұрын
Nice vid man!!
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
Thank you
@thingsiplay
@thingsiplay 3 жыл бұрын
Hyperfine itself is written in Rust. :D
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
I'm not even doing this on purpose, Rust apps just keep coming showing up in front of me
@thingsiplay
@thingsiplay 3 жыл бұрын
@@BrodieRobertson For good reason. :-) I am currently learning Rust myself (coming from Python XD) and I am glad its adopted so well. And I understand why this is. It is the first of its kind also and soon other languages with the same concept will popup. So you see, it doesn't bother me when you cover Rust apps. I can just learn from them or maybe contribute to them one day.
@hermannpaschulke1583
@hermannpaschulke1583 3 жыл бұрын
Rust 👌😤
@RichardBronosky
@RichardBronosky 3 жыл бұрын
11:52 Why do you hate YAML, Bro? Unsubscribed! #PoesLaw
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
It's an overly bulky format, it's good when it provides some benefit but a lot of devs use it without much thought
@RichardBronosky
@RichardBronosky 3 жыл бұрын
@@BrodieRobertson I assume you are describing JSON
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
@@RichardBronosky JSON also falls into that camp
@LabiaLicker
@LabiaLicker 3 жыл бұрын
This is why I'm subbed
@BrodieRobertson
@BrodieRobertson 3 жыл бұрын
I like experimenting with new content but I have to always come back to my roots
Linux Kernel Github Is Absolutely Chaotic
15:03
Brodie Robertson
Рет қаралды 158 М.
We Finally Did it Properly - "Linux" Whonnock Upgrade
21:07
Linus Tech Tips
Рет қаралды 3,8 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 10 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 7 МЛН
Linus Torvalds Threatens To REMOVE This File System
25:16
Brodie Robertson
Рет қаралды 49 М.
How A Steam Bug Deleted Someone’s Entire PC
11:49
Kevin Fang
Рет қаралды 1 МЛН
Crafting Command Line Tools With Rust
46:43
Tokyo Rust Meetup
Рет қаралды 3,7 М.
Valve Fixes Wayland Governance Overnight!
24:32
Brodie Robertson
Рет қаралды 61 М.
When A Top Level Domain Outlives Its Country
16:21
Brodie Robertson
Рет қаралды 30 М.
Trying to do Simple Tasks on Linux lol - Daily Driver Challenge Pt.3
29:44
Linus Tech Tips
Рет қаралды 2,8 МЛН
These Keys Shouldn't Exist | Nostalgia Nerd
19:32
Nostalgia Nerd
Рет қаралды 693 М.
What The Arch Linux x Valve Collab Means For You!!
12:15
Brodie Robertson
Рет қаралды 38 М.
Parse Rust CLI Args With Clap 🦀 Rust Tutorial
54:03
Trevor Sullivan
Рет қаралды 12 М.