Retourner au contenu associé (lien : Go 1.22)
Posté par woffer 🐧 (site web personnel) le 08 février 2024 à 08:30. En réponse au lien Go 1.22. Évalué à 1. Dernière modification le 08 février 2024 à 08:31.
Inutile, je ne sais pas, tu peux avoir besoin de faire N fois une même chose, l'exemple du package benchmark :
func BenchmarkRandInt(b *testing.B) { for i := 0; i < b.N; i++ { rand.Int() } }
devient
func BenchmarkRandInt(b *testing.B) { for range b.N { rand.Int() } }
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Mux & co
Posté par woffer 🐧 (site web personnel) . En réponse au lien Go 1.22. Évalué à 1. Dernière modification le 08 février 2024 à 08:31.
Inutile, je ne sais pas, tu peux avoir besoin de faire N fois une même chose, l'exemple du package benchmark :
devient