commit briefs
branches
tree
readme
Preamble
This is my attempt at a Rosetta Code project using the Collatz conjecture. None of this mischeif should be used as a benchmark to see how fast a language is as it is almost always one-sided towards the best language I write in. It would take different approaches in other languages which may or may not be slower or faster in a certain language.
Story
I wanted to learn how ArrayList works in Zig and how fast it would be. It took around one second to generate 10,000 Collatz sequences on my hardware and I was initially reasonably stumped. I ended up optimising it after some tweaks to use a FixedBufferStream which improved it by ~900ms. I then wrote it in Rust and C++ for testing, with Rust being slower which was unusual to the person I was talking to. I then decided to make to try other languages to see how much more confusing it would be.
Haskell beating C++ and Zig was insane to me but I realised they we're probably my fault so I treated it not like a benchmark.