Hacker News new | past | comments | ask | show | jobs | submit login

Cool. Awk is a nice tool for semi-simple record-at-a-time processing.

As far as I can tell, this implementation is much slower than other awks. Most awk implementations use a non-backtracking regex implementation (as do Rust and Go). By contrast, this seems to be using a backtracking implementation (e.g., like Perl and Python). For simplicity that makes sense, but for some regexes this kind of implementation can be many orders of magnitude slower.

My guess is that this slowdown doesn't matter for a typical toybox user, where small code size is valued. Thanks for the link!




Looks like it uses the standard POSIX regular expression functions - regcomp() and regexec().


Do you mean for the parser or the engine that does the awking?

I was looking over the POSIX spec to see what's so difficult about parsing it and just kind of wondering.


You can write a Z-Machine interpreter in awk, a Tetris and with Gawk, even a gopher client.




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

Search: