Tags: benhoyt/goawk
Tags
Build with PGO - it's more than 5% faster We can probably get a more realistic PGO profile than just running the microbenchmarks, but it'll do. goawk=go1.21.0 with PGO orig =go1.21.0 without PGO Test | goawk | orig | awk ---------------------------- | -------- | -------- | -------- tt.01 (print) | 3.02 | 2.76 | 1.00 tt.02 (print NR NF) | 2.07 | 1.95 | 1.00 tt.02a (print length) | 1.85 | 1.80 | 1.00 tt.03 (sum length) | 1.53 | 1.47 | 1.00 tt.03a (sum field) | 1.47 | 1.44 | 1.00 tt.04 (printf fields) | 1.36 | 1.21 | 1.00 tt.05 (concat fields) | 1.54 | 1.48 | 1.00 tt.06 (count lengths) | 1.64 | 1.55 | 1.00 tt.07 (even fields) | 1.49 | 1.43 | 1.00 tt.08 (even lengths) | 2.54 | 2.60 | 1.00 tt.08z (regex simple) | 3.73 | 3.71 | 1.00 tt.09 (regex starts with) | 2.87 | 2.83 | 1.00 tt.10 (regex ends with) | 0.47 | 0.45 | 1.00 tt.10a (regex ends with var) | 0.45 | 0.44 | 1.00 tt.11 (substr) | 3.35 | 3.16 | 1.00 tt.12 (update fields) | 1.53 | 1.51 | 1.00 tt.13 (array ops) | 4.84 | 4.28 | 1.00 tt.13a (array printf) | 3.03 | 2.83 | 1.00 tt.14 (function call) | 1.73 | 1.50 | 1.00 tt.15 (format lines) | 1.00 | 0.97 | 1.00 tt.16 (count words) | 1.92 | 1.77 | 1.00 tt.big (complex program) | 2.29 | 2.17 | 1.00 tt.x1 (mandelbrot) | 2.68 | 2.67 | 1.00 tt.x2 (sum loop) | 2.41 | 2.19 | 1.00 ---------------------------- | -------- | -------- | -------- **Geo mean** | **1.86** | **1.76** | **1.00**
Fix "undefined function" error with mutually-recursive functions (#184) Fix "undefined function" error with mutually-recursive functions When the AWK code defines mutually-recursive functions, the topological sort can't help us. So define all funcInfos in the initial call-graph pass before doing any resolver passes. This avoids the "undefined function" error in those cases. Add a minimal test for this, and also add a test of parsing/using the gron.awk code, as it's a nice, fairly complex test case. Fixes #183. Thanks @xonixx for the bug report!
PreviousNext