Looking to properly benchmark Go, Nodejs, Rust and Swift. I have a problem with this code which seem inefficient compare to Rust. How did Rust manage memory so efficiently?
Rust code use 40MB+ memory and completed in 4 secs
https://github.com/kostya/benchmarks
Swift code use 1GB+ without autoreleasepool and completed in 13 secs
If adding autoreleasepool {} in the loop scope to force release memory it will use 60MB+.
I like to have your advice how we can speed Swift to be comparable as Rust?