4 ms·
In most of these benchmarks [1] Swift's performance comes pretty close to that of Rust. So yeah, I would call that very fast. [1] https://web.archive.org/web/
by plainOldText 7y ago
In most of these benchmarks [1] Swift's performance comes pretty close to that of Rust.
So yeah, I would call that very fast.
[1] https://web.archive.org/web/20190402100249/https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/swift-rust.html https://web.archive.org/web/20190402100249/https://benchmark...
- raphlinus 7y agoTry some JSON benchmarks with Codables in Swift vs serde in Rust. Rust smokes Swift, something like 20x. Incidentally I've spent considerable effort on this problem, including writing a prototype faster JSON parser in Swift (still about 3x slower than Rust, but a huge speedup over what's there). I couldn't get anyone in the Swift community to care enough to motivate me to finish the work, which is indicative of a deeper problem: Swift just doesn't have "performance culture," the benchmark game results notwithstanding.
- mpweiher 7y agoHmm...when I look at those numbers, Swift only comes close in a very few, is significantly slower in most (50%-4x) and much slower in one (45x): fannkuch / pidgins: essentially the same binary-trees / fasta / Mandelbrot: ~ 1.5x slower spectral-norm / reverse-complement: >= 2x slower k-nucleotide / n-body: ~4x slower regex-redux: 45x slower