While doing a little TV binge-watching on quarantine tonight, I decided to convert one of the examples from this blog post, https://tryolabs.com/blog/2020/04/02/swift-googles-bet-on-differentiable-programming/, into Nim.
The code is posted here, https://github.com/chrisheller/experiments/tree/master/swift-python-performance, and just walks through doing the same changes that the original author makes to convert their Python example to Swift.
The end result in Nim comes in just slightly faster than the author's Swift code or the C code that they were trying to match, but still looks very close to the original Python code. Insert large caveat here about micro-benchmarks, especially since I'm comparing to the author's stated Swift times since I don't have Swift installed on this laptop.
Note that I didn't try to make the code more idiomatic Nim, I just started with the original Python code and just made the minimal changes to make it Nim.
Also Swift is seriously lacking in multidimensional array, dataframe and a plotting library. Those are the 3 building blocks off a machine learning ecosystem.
Lastly Google seems to be betting more on the following: