Open kevinburkesegment opened 7 months ago
I've retitled the issue to more closely match what I think your intention is.
Exactly thank you!
On Thu, Apr 11, 2024 at 19:56 Dominik Honnef @.***> wrote:
I've retitled the issue to more closely match what I think your intention is.
— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/dominikh/go-tools/issues/1518*issuecomment-2050875005__;Iw!!NCc8flgU!Yl6go6hZF-NhVXzsBJIXRL1AqAqKucHHPLONTtohsSeS9jV2YyXfnOWrfMQnfdbgWYxiBEScECxw-wnwnkTLdmDVX4o$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AW5SL4XSPT3ACXWPKHD4FP3Y45EMXAVCNFSM6AAAAABGDBO7UKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQHA3TKMBQGU__;!!NCc8flgU!Yl6go6hZF-NhVXzsBJIXRL1AqAqKucHHPLONTtohsSeS9jV2YyXfnOWrfMQnfdbgWYxiBEScECxw-wnwnkTLS3iqSV4$ . You are receiving this because you authored the thread.Message ID: @.***>
I was just looking at some code that compiled a regex, and then checked for a match by writing:
This is reducible to
return rx.Match(b)
, which is less wasteful. It would be good to suggest this optimization.