News for hackers. Stuff that matters.
Re:Apple is rewriting Foundation in Swift by GeekyBear on Sunday May 21, 2023 @11:34PM (#36027167)
> From what I've seen the ref counting can cause a big performance hit.

Apple has been writing OS components in Swift for a while now. It certainly doesn't seem to be producing the performance issues we saw when Google attempted to write components for Fuchsia in Go or Microsoft's effort to create new features for Longhorn in .NET.

Re:Apple is rewriting Foundation in Swift by comex on Monday May 22, 2023 @12:14AM (#36027391)
But it's mostly replacing Objective-C code which was already not particularly fast – as opposed to the C++ or C code used more often in performance- or memory-sensitive areas.

My experience with Swift is somewhat limited, because every time I've tried to use it, I've run into glaring performance issues and had to switch language. It might be reasonably performant compared to Go or .NET, but it's nothing like Rust.

Re:Apple is rewriting Foundation in Swift by trinix912 on Monday May 22, 2023 @12:43AM (#36027545)
What kind of stuff were you doing in Swift to notice performance issues? I've been developing macOS and iOS apps for a while now and it doesn't seem much slower than Objective-C.
Re:Apple is rewriting Foundation in Swift by aatd86 on Monday May 22, 2023 @01:32AM (#36027785)
Was probably due to FFI for Go I'd assume.

Do you have a reference somewhere I can read up?

Re:Apple is rewriting Foundation in Swift by GeekyBear on Monday May 22, 2023 @01:59AM (#36027928)
It was discussed here when they decided their networking stack in Go would need to be rewritten for performance reasons, and banned the future use of Go for Fuchsia system components.

https://news.ycombinator.com/item?id=22409838