Skip to content

Releases: benhoyt/goawk

Version 1.15.0

03 Feb 06:46
Compare
Choose a tag to compare

This release adds no new features. It's a significant performance improvement due to switching the internals of the interpreter from a tree-walking interpreter to a bytecode compiler with a virtual machine interpreter.

Results show that it's 18% faster overall on microbenchmarks, 13% on more real-world benchmarks. It should be fully backwards compatible -- please file an issue if you find a regression!

Read the details here.

Version 1.14.0

25 Jan 08:35
8b30832
Compare
Choose a tag to compare

This reverts the feature from v1.11.0 which changed the builtin functions length, substr, index, and match to use character indexes instead of byte indexes (as per the POSIX spec). The reason is because it changed those functions from O(1) to O(N), which created "accidentally quadratic" behavior in scripts that expected these functions to be O(1).

For example, @xonixx's grok.awk script on a relatively large JSON input file took about 1s in bytes mode (goawk -b), but 8 minutes (!) in the new unicode char default mode. That's extremely problematic.

Like v1.11.0, this release is again a small breaking change, but once again shouldn't affect many scripts (it will again only affect scripts that use constant indexes for substr on non-ASCII strings). I hope not many people are using interp.Config.Bytes or the goawk -b option yet, as those are gone again. Seeing v1.11.0 was only introduced a few weeks ago, I think it's worth the breakage for a performance problem of this magnitude.

Fixes #93: "Major speed regression for gron.awk in goawk 1.11.0+".

Version 1.13.0

04 Jan 09:28
Compare
Choose a tag to compare

Support RS being multiple characters and regular expressions RS (#86), allowing significantly more powerful text processing. This is a Gawk extension to POSIX, which says, "If RS contains more than one character, the results are unspecified."

Version 1.12.0

04 Jan 02:05
Compare
Choose a tag to compare

This release adds support for "getline lvalue" forms. See #85.

Version 1.11.0

03 Jan 05:46
b7ec795
Compare
Choose a tag to compare

This release changes the handling of the builtin functions length, substr, index, and match to use character indexes instead of byte indexes, as per the POSIX spec.

So this is a small backwards-incompatible change, but I think it's 1) warranted given GoAWK tries to conform to POSIX, and 2) won't break most scripts, even ones that use non-ASCII, unless they use constant indexes for substr on non-ASCII strings. To revert to the previous bytes-index behavior, set interp.Config.Bytes to true when using from Go, or use the new goawk -b option for the command-line version.

This does affect the performance of those builtins, as some operations that were O(1) are now O(N) in the length of the string. Still, v1.10.0 introduced other performance improvements, and it's pretty much a wash on the "real world" benchmarks overall.

See PR #83 and issue #35 for further discussion.

Version 1.10.0

03 Jan 05:31
Compare
Choose a tag to compare

This release includes a performance improvement and several bug fixes:

This release also adds the AWKGo AWK-to-Go compiler as described here, but it's a separate executable that doesn't change GoAWK itself at all. Read more about AWKGo.

Version 1.9.2

04 Nov 20:18
Compare
Choose a tag to compare

Fix builds on Go versions before 1.17 due to missing +build constraint. Fixes #74.

Version 1.9.1

23 Oct 23:25
Compare
Choose a tag to compare

CLI: fix handling of "-" argument: #71

Version 1.9.0

23 Oct 10:12
Compare
Choose a tag to compare

Includes the following features and fixes:

  • Add support for getline <"-" and print >"-": #63
  • Add ShellCommand config option and change default to /bin/sh (on Unix): #64
  • Make number literal edge cases behave like awk/gawk: #69
  • Disallow statements immediately after another one without ; or newline separator: #68
  • Fill in unknown parameter types that are being called with arrays: #70 (fixes #45)
  • Various other minor tweaks (see all commits)

Version 1.8.1

18 Aug 21:02
Compare
Choose a tag to compare

Fix go install bug due to presence of -ftest file (see 0adcb10).