From 8' to 4": massive pkgsrc performance gain by replacing a shell script with awk reddit / BSD ---------------------------------------------------------------------- iMil · 2020-08-22 04:41 Here's an impressive piece of _pkgsrc_ optimization by Jonathan Perkin. He rewrote a shell script responsible for calculating checksums which took 8 minutes to compute 600 files, with an `awk` script that only takes less than 4 **seconds**. Here's the commit, and also a superb piece of `awk` learning material: https://github.com/joyent/pkgsrc/commit/a040b8962acbab10bdb8bd94eb8012 9b5dc6279f ---------------------------------------------------------------------- jaypatelani · 2020-08-22 04:44 Awesome.. ---------------------------------------------------------------------- rhabarba · 2020-08-22 08:22 Ah, the joys of using software from a time when performance was a valuable asset. ---------------------------------------------------------------------- iMil · 2020-08-22 09:01 Amen to that. ---------------------------------------------------------------------- aScottishBoat · 2020-08-22 12:01 This is very cool. Very readable `awk` script, and I learned a lot from it. And the performance gain... Good work. ---------------------------------------------------------------------- jwbowen · 2020-08-22 15:20 awksome ---------------------------------------------------------------------- jaypatelani · 2020-08-22 15:47 He he nice pun.