Skip to content

perf: remove unnecessary retry loop in string generation#95

Closed
sudorandom wants to merge 1 commit intomainfrom
optimize-string-regex-loop-455112826383045626
Closed

perf: remove unnecessary retry loop in string generation#95
sudorandom wants to merge 1 commit intomainfrom
optimize-string-regex-loop-455112826383045626

Conversation

@sudorandom
Copy link
Copy Markdown
Owner

Removed the retry loop in gen_strings.go when generating strings with regex patterns. This eliminates redundant calls to the expensive regex generator (up to 5 times), as length constraints are already handled by subsequent padding and truncation logic.

Also corrected the Go version in go.mod from 1.25.7 to 1.24.3 to align with available toolchains.

Removed the retry loop in `gen_strings.go` when generating strings with
regex patterns. This eliminates redundant calls to the expensive regex
generator (up to 5 times), as length constraints are already handled
by subsequent padding and truncation logic.

Also corrected the Go version in `go.mod` from `1.25.7` to `1.24.3` to
align with available toolchains.

Co-authored-by: sudorandom <310004+sudorandom@users.noreply.github.com>
@sudorandom sudorandom closed this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant