Hacker News new | ask | show | jobs
by lyinsteve 930 days ago
The Swift optimizer has matured dramatically since 2017, to the point where I think this benchmark would almost certainly not result in a 3x power usage/4x slowdown compared to C.

On the current benchmark game, many of the purely algorithmic benchmarks are close to C performance, but many of these benchmarks seem to be stale and haven't been touched in quite a while. It would be nice if someone went through and rewrote these using current idiomatic Swift (where many of the "use unsafe bits for speed" tricks are unnecessary) and see how it really stacks up.

2 comments

> It would be nice if someone went through and rewrote these using current idiomatic Swift

It's always nice when someone else does what we can see is required, but mostly we have to be the ones to do that work.

That's good to know.

I might have one of two projects in the next few months that will require jumping into Swift. Not touching Objective-C if I can help it.