Recent submissions

Comment · 2 years 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.

Comment · 8 years ago
I don’t know much about rust specifically, but the overflow traps happen in debug (i.e. -O0) builds, and are not emitted when optimizations are enabled.

LLVM’s constant folding and canonicalization passes will convert (x * 2) / 2 from

%0 = mul i64 %x, i64 2

%1 = div i64 %0, i64 2

to

%0 = shl i64 %x, i64 1

%1 = shr i64 %0, i64 1

Which constant folding will reduce to just %x.

Comment · 9 years ago
There are tons of amazingly-smart people working on Swift at Apple right now
Comment · 9 years ago
-swift-version 3 really just turns on some different paths through the parser and type checker to allow previously-valid Swift 3 code to survive to code generation time.

They're both compatible

Comment · 9 years ago
I have the strange feeling this will really only be used to enforce the copyrights of large music and movie industry corporations and will not be effective at protecting the IP of independent creators.
Comment · 9 years ago
This should be much higher. Thanks!
Comment · 10 years ago
The author completely missed the point of named parameters. How am I supposed to know that the string argument of "make_window" is the title?
Comment · 11 years ago
Comment · 11 years ago
Apple uses XMPP internally as a way to securely communicate.

Doesn't really change much; just thought that'd be an interesting thing to throw out.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton