r/shittyprogramming • u/dianyo • Feb 26 '26
Thefuck is now faster in Rust
https://github.com/dianyo/thefuck-rsLook, I'm a busy person. I can't wait 151ms for a fuck.
The Python version was too slow. By the time it loaded,
I'd already messed up three more commands.
So I rewrote it in Rust. Now I get a fuck in 2.7ms.
Life-changing benefits:
- Faster fucks
- More fucks per minute
- Never wait for a fuck again
Was it worth rewriting whole python code with rust just to speed up my fucks?
Absolutely.
https://github.com/yourname/thefuck-rs
P.S. My girlfriend doesn't like it.
160
Upvotes
91
u/ShitTalkingAssWipe Feb 26 '26
Repo 404, true r/shittyprogramming
30
u/eachdayalittlebetter Feb 26 '26
the fuck did I just read
24
u/Dushenka Feb 27 '26
Ahh, yes, comparing execution speeds with the original implementation while only using a small subset of the original rules, shitty programming indeed.
PS: Your girlfriend is definitely smarter than you.
10
u/gunni Feb 26 '26
make it in c, using no libraries.
4
u/ask_compu Feb 27 '26
i just do
alias fuck='echo "sudo $(fc -nl -1)" && sudo $(fc -nl -1)'in my bash aliases file6
u/ings0c Feb 27 '26
Bro, come on. You don't have a girlfriend.