News for hackers. Stuff that matters.
Re:Swift 6 by rudedogg on Tuesday September 17, 2024 @05:28PM (#41573000)
It has nowhere near the performance characteristics of those languages. It could, but it doesn’t. Look up a variety of language benchmarks. It’s typically ranked around Python/Javascript. You can get as fast as C but the code is very atypical.
Re:Swift 6 by azinman2 on Tuesday September 17, 2024 @05:43PM (#41573159)
There's no way it's close to Python. Where are the benchmarks?

https://github.com/sh3244/swift-vs-python

Shows a huge difference, as expected for a typed memory-safe compiled language using LLVM versus an interpreted language with a global interpreter lock.

Re:Swift 6 by rudedogg on Tuesday September 17, 2024 @05:55PM (#41573269)
Re:Swift 6 by KerrAvon on Tuesday September 17, 2024 @08:19PM (#41574315)
The thread you just posted has a bunch of posts indicating this was not the actually the same program in Python and Swift; further, the Swift version was written poorly. Plus, the graph in the final post shows whatever Swift version someone ran tests on as much faster than Python.
Re:Swift 6 by pzo on Tuesday September 17, 2024 @05:45PM (#41573183)
It is slower, like probably ~3x but lets not exaggerate that it ranks around python

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...