Hacker News new | ask | show | jobs
by dep_b 2935 days ago
Vapor apparently gets favorable reviews by those who drank the Kool-Aid:

https://vapor.codes/

Never tried it though. I don't select stacks primarily based on programming language.

2 comments

I’ve used it for a few sites at this point. Haven’t used v3 but it’s been a great resource. It’s a cool experience coding a website with a compiled language, especially swift.
Vapor looks like the best so far but it's still early days. In theory it has the potential to be extremely fast and memory efficient, but for example they only just got a couple TechEmpower benchmarks up a couple days ago and they ranked very low (#162 on the json test).[1]

It goes without saying simplistic benchmarks like this are flawed but at the same time, you have to start somewhere.

[1] https://www.techempower.com/benchmarks/#section=data-r16&hw=...

JSON performance is super important for a server, far more than for the usual macOS or iOS clients. JSON parsing might be based on the basic JSON parser found in Swift, which isn't fast at all, rather easy to use and secure instead.

It's not super up-to-date but you can see there's definitely some competition even on Swift level in terms of JSON performance. https://github.com/bwhiteley/JSONShootout

Swift JSON encoding/decoding should approach C/C++ levels of performance when optimized for speed.

The plaintext benchmark was also slow, so the JSON implementation may not be the main cause here.