News for hackers. Stuff that matters.
Re:Swift Syntax and Structured Editing Library by Zababa on Sunday September 26, 2021 @01:05PM (#28662508)
How is the performance? Vapor's is terrible, which combined with the small ecosystem makes it a bad choice for backend.
Re:Swift Syntax and Structured Editing Library by still_grokking on Sunday September 26, 2021 @02:05PM (#28663068)
Is this the reason IBM stopped its Swift on the server endeavors?
Re:Swift Syntax and Structured Editing Library by Zababa on Sunday September 26, 2021 @02:34PM (#28663335)
There are a few things here https://www.infoq.com/news/2020/01/ibm-stop-work-swift-serve.... From what I remember when it was announced, the small ecosystem was mentioned, but not the performance.
Re:Swift Syntax and Structured Editing Library by smoldesu on Sunday September 26, 2021 @02:20PM (#28663217)
Possibly one of them. Swift has just generally had a confusing, lopsided development cycle that has made it extremely hard to build larger/more-abstracted systems on top of it. I'm not quite so sure what breakage looks like these days, but the language only got null-checking a few months ago. I do hope they lay out more groundwork before making the push to non-Apple platforms.
Re:Swift Syntax and Structured Editing Library by Redoubts on Sunday September 26, 2021 @02:27PM (#28663286)
> the language only got null-checking a few months ago.

???

Re:Swift Syntax and Structured Editing Library by user-the-name on Sunday September 26, 2021 @02:40PM (#28663380)
> but the language only got null-checking a few months ago

Are we talking about the same language?

Re:Swift Syntax and Structured Editing Library by WSSP on Sunday September 26, 2021 @05:01PM (#28664634)
out of curiosity what does terrible means relative to other web server frameworks, and any idea what explains it?

I would expect a Swift web framework has at least the potential to be performant

Re:Swift Syntax and Structured Editing Library by Zababa on Sunday September 26, 2021 @05:29PM (#28664825)
"terrible" here means within the ballark of Express and usually lower than Phoenix (the Elixir web framework), far slower than Go, and than most Java framework. The source is the TechEmpower framework benchmarks, with the caveat that Vapor isn't in all the categories, and the usual benchmarks caveat.

For why it's not performant, I don't know precisely. Part of it may be because people don't use it a lot on the server side so it's not as optimized as the others. From what I've heard, Swift was also optimized for low memory usage rather than raw speed. Outside of that, I don't know. I would expect it to be around Go.

Re:Swift Syntax and Structured Editing Library by WSSP on Sunday September 26, 2021 @07:39PM (#28665633)
> From what I've heard, Swift was also optimized for low memory usage rather than raw speed

at a 1000 foot view, Swift inherits its reference counting system from Objective-C, meaning objects are freed immediately when their retain count goes to zero; vs a tracing GC releasing many objects whenever a tracing cycle runs. maintaining reference counts also adds a cost that a different GC approach could avoid. it's true that Swift will maintain a lower memory footprint, potentially at the cost of lower throughput

I would be a little surprised if that explains the bulk of a performance difference though, vs Swift frameworks being newer and less optimized

Re:Swift Syntax and Structured Editing Library by Zababa on Monday September 27, 2021 @12:49PM (#28673046)
Thank you for the explanation