/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

hypothesis.works
| | mfbmina.dev

One of my favorite features in Go is the possibility of writing benchmark tests. At Go 1.24, this feature has a new look, making it easier to use. To demonstrate these changes, let's suppose a function that calculates the factorial recursively and one that calculates it through loops. func FatorialRecursive(n int) int { if n == 0 { return 1 } return n * FatorialRecursive(n-1) } func FatorialLoop(n int) int { aux := 1 for i := 1; i <= n; i++ { aux *= i } return aux } Previously, to write a benchmark, it was necessary to write down the whole execution loop of the test. When done, we need to run the command $ go test -bench .
8.7 parsecs

Travel
| |
| | felixfever.nekoweb.org


16.4 parsecs

Travel
| |
| | siderite.dev

While trying to optimize a sorting algorithm that worked on iterables I've noticed how slow iterators and generator functions are.
6.6 parsecs

Travel
| |
| | incessantpain.neocities.org

[AI summary] The user's text is a richly detailed, introspective account of their life, filled with vivid imagery, personal reflections, and a blend of mundane and profound observations. It captures a journey through various phases of life, marked by moments of creativity, nostalgia, and introspection. The narrative weaves together elements of daily life—like thrift shopping, cooking, and family interactions—with deeper existential thoughts about time, identity, and personal growth. The tone is reflective and contemplative, with a sense of movement through different stages of life, often juxtaposing the mundane with the profound. The text also includes references to literature, film, and art, suggesting a deep engagement with cultural and intellectual pursui...
92.8 parsecs

Travel
|