Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Shameless plug of `loc`, a rust implementation of `cloc` that is 100+ times faster:

https://github.com/cgag/loc



Has it any remarkable features other than "it's written in Rust"?


100x faster sounds like a remarkable feature to me.

(I haven't tried this yet, though I do use tokei, which is faster but not this fast. Been meaning to try it out.)


> that is 100+ times faster

is that not enough?


Depends on how slow cloc is. 100x faster than "already very fast" is not going to be a perceptible benefit.


The readme talks about dragonfly BSD's codebase; almost two minutes for cloc, just over one second for loc. That's a noticeable difference.


But how often do you cloc the BSD codebase?

I do clocs maybe once a week. So waiting for 2 minutes isn't really a huge issue here. (Well, it's less than 2 minutes for my code bases).

Smells like premature optimization ;)


This is totally true as well.


lol.

I too get tired of seeing all this "take X and write it in rust".

OTOH it's a new area and the younger crowd gets to try and make a name for themselves in something that isn't already fully established.

But seriously, I've never thought to myself "cloc is too slow" and even if I did, I'd run it overnight.


... in Rust!


Aw maaaan. No homebrew yet?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: