JuliaLang / Microbenchmarks

Microbenchmarks comparing the Julia Programming language with other languages
https://julialang.org/benchmarks/
Other
88 stars 48 forks source link

Add swift #60

Open acxz opened 2 years ago

acxz commented 2 years ago

This PR adds the popular Swift language created by Apple.

Swift was written by Chris Lattner who wrote LLVM and many LLVM constructs can be thought of easily in Swift (Chris has described it as "syntax sugar for LLVM"). Swift however has not seen a huge population in scientific computation. There have been some projects like tensorflow/swift where Google tried to rewrite Tensorflow into Swift to incorporate machine learning constructs and differentiation directly into the Swift language. This plan was eventually scrapped, but Swift definitely has the pieces for some good scientific computing, with easier syntax and fast speed. Here is some more motivation for Swift as a numerics language: Article by Jeremy Howard

Anyway all that is to motivate a benchmark comparison with Swift. I'm not the best Swift programmer by any means, but thought I'd give a go at implementing the benchmarks.

This PR is a draft for now as I still can't get the matrix tests to work and mandel is giving me the incorrect solution. But I thought opening this up and having it run through the CI pipeline might interest others to provide feedback on this PR and finish it off.