Rust sort_unstable_by with more complex closure unexpectedly shrunk binary
A Rust developer discovered that adding a boolean argument and an if-statement inside a sort_unstable_by closure unexpectedly reduced the compiled binary size by about 1KB, with the quicksort function alone shrinking by 980 bytes. The cause remains unclear despite similar inlining, and the effect was observed on the arm-unknown-linux-gnueabihf target.
Background
- Rust's `sort_unstable_by` uses an internal **quicksort** implementation that gets compiled (monomorphized) for the specific comparison closure you provide — the compiler can see through simple closures and heavily optimize the sort routine.
- The author expected that adding an `if` branch inside the closure would make the binary larger; instead, the quicksort function got *smaller* (by ~1 KB). This is a surprising result that illustrates how compiler optimizations (inlining, constant propagation, branch prediction hints) are often non-obvious: more complex source code can sometimes produce *smaller* machine code by changing what gets inlined, how registers are used, or by enabling the compiler to merge code paths.
- The target is ARM 32-bit (arm-unknown-linux-gnueabihf), a common embedded/SoC platform where binary size matters.
- The post is on Hacker News, where such optimization curiosities are routinely discussed by systems programmers.
Max Weinbach says he had early access to OpenAI's new model GPT-5.6 Sol, calling it his favorite model by far. He highlights that it never gives up and will keep reasoning until it's done. OpenAI announced that GPT-5.6 Sol, along with Terra and Luna, will launch publicly on Thursday, with preview access expanding globally now.
The US government ordered Anthropic to suspend access to its Fable 5 and Mythos 5 models for all customers, citing a potential jailbreak technique that involved asking the model to review a codebase for vulnerabilities—a capability Anthropic says is available in other public models. Access was abruptly cut off on June 12.
Andrej Karpathy announces the release of Claude Fable 5, the same underlying model as Mythos but with added safeguards. He calls it a major step forward, particularly for long problem-solving sessions on difficult tasks, and describes it as state-of-the-art on nearly all benchmarks with exceptional performance in software engineering, research, and vision.
Roman Storm warns that the legal theory in his case could set a precedent making open-source developers liable for how others use their code, potentially criminalizing the mere publication of privacy, messaging, or crypto tools. He notes that developer Michael Lewellen cannot publish lawful code due to prosecution fears, and argues this chilling effect extends beyond any single case.
Meta's engineering culture is deteriorating under Mark Zuckerberg and Scale AI CEO Alexandr Wang, who have introduced keyboard tracking, reassignments to data labeling, and AI-centric performance metrics. Critics argue this incentivizes performative AI use, drives away experienced engineers, and contributed to a major Instagram hijacking incident caused by AI-written and AI-reviewed code.