Skip to content

v1.6.0

Compare
Choose a tag to compare
@anuraaga anuraaga released this 20 Jun 01:42
· 89 commits to main since this release
b40a321

This is a relatively large release. While working with @itaischwartz debugging some issues with the cgo backend under extreme memory pressure, we found a need to rework how we execute Replace* methods, by moving more logic from C++ into Go. The end result not only should help with the cgo issue, but perform a little better by avoiding an extra allocation.

More importantly though, it allowed us to implement ReplaceFunc, which had been a missing API since launching the project. With that, the only methods not supported are *Reader, which are expected to be uncommonly used. Hopefully this makes it even easier to just "drop-in" go-re2 into an existing project.

In addition, a custom allocator that was used on unix is now also implemented for Windows, which should improve compatibility when running on systems with less available RAM. A fix was also made so the unix allocator can work on FreeBSD.