hi

hist: An overengineered solution to `sort|uniq -c` with 25x throughput

Hacker News

hist: An overengineered solution to `sort|uniq -c` with 25x throughput

Was sitting around in meetings yesterday and remembered an old shell script I had to count the number of unique lines in a file. Gave it a shot in rust and with a little bit of (over-engineering)™ I managed to get 25x throughput over the naive approach using coreutils as well as improve over some existing tools. Some notes on the improvements: 1. using csv (serde) for writing leads to some big gains 2. arena allocation of incoming keys + storing references in the hashmap instead of storing owned values heavily reduced the number of allocations and improves cache efficiency (I'm guessing, I did not measure). There are some regex functionalities and some table filtering built in as well. happy hacking

Share card

Actual performance

4points
3comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
68%68% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
48%48% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: exist, existing, io · Missing: https docs, excited, just released
45%45% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
45%45% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Product HuntUnlikely to reach the leaderboard · Strong signals: using, notes · Missing: mac, agents, macos
45%45% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
17%17% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
3%3% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

TD
TDD Screencast #2: Implementing Sort19%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TDD Screencast #2: Implementing Sort

Hacker News3
Cl
Cluster-Sort27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cluster-Sort

Hacker News2
Qu
QuadSort, Esoteric Fast Sort30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

QuadSort, Esoteric Fast Sort

Hacker News78
Fa
Faster than std:sort and pdqsort35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Faster than std:sort and pdqsort

Hacker News1
Yo
YouTube Sort by Likes47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

YouTube Sort by Likes

Hacker News1
vi
vim-sort-folds – Sort vim folds based on their first line30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

vim-sort-folds – Sort vim folds based on their first line

Hacker News3
Ki
KillerTask: the solution to AsyncTask implementation (in Kotlin)29%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

KillerTask: the solution to AsyncTask implementation (in Kotlin)

Hacker News5
0p
0patch, vulnerability micropatching solution41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

0patch, vulnerability micropatching solution

Hacker News1
Me
Metis - A Divine Solution for Unix Aliases54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Metis - A Divine Solution for Unix Aliases

Hacker News1
My
My solution to scaling P2Pool46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

My solution to scaling P2Pool

Hacker News1