News for hackers. Stuff that matters.
Re:Swift 5 Release Notes for Xcode 10.2 by stephencanon on Monday March 25, 2019 @07:09PM (#19487647)
That's not Swift matrices. Swift hasn't defined a language-level numeric matrix type. That's a C library type imported into Swift.

You can alternatively import Python and use NumPy directly, as well as any other C library, or you can define numeric operations in Swift. (On the other hand, if you are using fixed-size 3x3 or 4x4 matrices, the simd_floatNxN types deliver vastly better performance than NumPy can. So it depends on what your goals are.)

Re:Swift 5 Release Notes for Xcode 10.2 by make3 on Monday March 25, 2019 @08:41PM (#19488200)
the point of using swift is to be faster than Python. if your computations are using numpy and most of your time is spent in these computations, passing through the python interpreter every time, it's going to have performance similar Python
Re:Swift 5 Release Notes for Xcode 10.2 by zapzupnz on Tuesday March 26, 2019 @01:00AM (#19489414)
> the point of using swift is to be faster than Python

There are plenty of other compelling reasons to prefer Swift over Python such as its type system or its easy, somewhat native, integration with existing Swift, Objective-C, and C frameworks available for macOS, iOS, watchOS, and tvOS.

Speed isn't the only driver, and I'm sure not it's not "the [only] point".

Re:Swift 5 Release Notes for Xcode 10.2 by make3 on Tuesday March 26, 2019 @11:10AM (#19492549)
no I meant for data science applications specifically, sorry
Re:Swift 5 Release Notes for Xcode 10.2 by make3 on Monday March 25, 2019 @08:43PM (#19488206)
plus numpy is apparently 3x slower than pure simd optimized c++ with something like eigen. I was hoping to get something faster (than numpy, not eigen) with swift