Skip to content

refactor: replace Split in loops with more efficient SplitSeq#1042

Merged
pr0n00gler merged 1 commit intoneutron-org:mainfrom
moveyield:main
Feb 24, 2026
Merged

refactor: replace Split in loops with more efficient SplitSeq#1042
pr0n00gler merged 1 commit intoneutron-org:mainfrom
moveyield:main

Conversation

@moveyield
Copy link
Contributor

strings.SplitSeq (introduced in Go 1.23) returns a lazy sequence (strings.Seq), allowing gopher to iterate over tokens one by one without creating an intermediate slice.

It significantly reduces memory allocations and can improve performance for long strings.

More info: golang/go#61901

Signed-off-by: moveyield <moveyield@outlook.com>
@moveyield
Copy link
Contributor Author

@pr0n00gler Hi, Could you please review this PR at your convenience? Thank you very much.

@pr0n00gler pr0n00gler merged commit 7537be1 into neutron-org:main Feb 24, 2026
4 of 5 checks passed
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.

2 participants