Skip to content

Improve Bitmap clear time and cleanup go ranges.#5

Open
romanalexander wants to merge 2 commits intomainfrom
roman/opts
Open

Improve Bitmap clear time and cleanup go ranges.#5
romanalexander wants to merge 2 commits intomainfrom
roman/opts

Conversation

@romanalexander
Copy link
Contributor

@romanalexander romanalexander commented Feb 28, 2026

i := 0; i < len = 149.8 ns/op
clear() = 81 ns/op


Note

Medium Risk
Mostly mechanical loop cleanups and a faster Clear, but bumping go.mod to Go 1.22 can break builds for consumers or CI pinned to older Go versions.

Overview
Speeds up fixed.Bitmap.Clear() by switching to the built-in clear() and modernizes several hot-path loops in boring and fixed bitmap/array operations to use Go 1.22’s for i := range n iteration.

Removes an unused min helper and updates go.mod to require Go 1.22 (enabling the new range syntax).

Written by Cursor Bugbot for commit eeaf0cf. This will update automatically on new commits. Configure here.

…ch is much slower.

`i := 0; i < len` = 149.8 ns/op
`clear()` = 81 ns/op
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