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

Can you link to the source of any widely deployed grep whose "inner loop" is coded in Assembly?



So does ripgrep... Which is written in Rust. So how exactly is Rust a poor fit?

And that isn't Assembly.

So I guess what you said earlier, "grep inner loops are coded straight in Assembly," was a misrepresentation. And that "Rust was a poor fit" is just empirically wrong.


If I would have to guess it would be codecs.


What do codecs have to do with grep?


grep respects LC_CTYPE, so it has to handle text encoding (or rely on something else that does, like libc or iconv).

However, by the same token, we might as well count any assembly in the kernel that gets executed due to some syscall from grep.


Those are locales. I've never heard them referred to as "codecs."

In any case, I'd still like to see a grep whose inner loop is written in Assembly. :-)


"en_US.UTF-8" is a locale. The "UTF-8" part is the encoding of that locale. Codec would be whatever piece of code parses the encoding.


>in the kernel that gets executed due to some syscall from grep

That won't be considered 'inner loop'




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

Search: