6 ms·
That’s not how you’d implement fibonacci in Go
by taklimakan 3y ago
That’s not how you’d implement fibonacci in Go
- tgv 3y agoThat's not how you'd implement it in rust either. It's a pretty bad benchmark. From my experience, I'd guess it's lack of tail recursion and the switch statement. That one can be slow in Go. It is however a good teaser for Moonbit.
- makapuf 3y agoYes, using WASM and Go in an contrived example and not mentioning tinyGo is not very honest.
- spion 3y agoI'm not a fan of Go, but I have to admit that benchmark doesn't make any sense. If you use tail calls in a language that doesn't support TCO, then of course you'll get bad results. I guess its easier to just throw in some numbers than compare idiomatic implementations and then discuss tradeoffs with some nuance. Even if its just a language teaser, I'd still add a note on TCO to avoid misleading people though.