Skip to content

Instantly share code, notes, and snippets.

@Howard3
Created February 4, 2024 04:12
Show Gist options
  • Save Howard3/9096dded111a3a3b9142c19f6132753b to your computer and use it in GitHub Desktop.
Save Howard3/9096dded111a3a3b9142c19f6132753b to your computer and use it in GitHub Desktop.
sample reverse slice
package main
import (
"slices"
)
const ToReverse = "Hello World!"
const iterations = 10_000_000
func main() {
for i := 0; i < iterations; i++ {
res := []rune(ToReverse)
slices.Reverse(res)
_ = res
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment