frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Rust sort_unstable_by with more complex closure unexpectedly shrunk binary

3•tracyspacy•2h ago
Thing I stumbled upon:

I added boolean argument and if statement inside sort_unstable_by closure:

``` //from

|&a, &b| compare(a, b)

//to

|&a, &b| if is_reverse { compare(b, a) } else { compare(a, b) } ```

I expected binary to grow slightly, but actually it became ca 1KB smaller.

I dug into with bloaty and found that the reason is: quicksort fn became 980 bytes smaller.

Still not sure why. Inlining looks same, quicksort just has fewer instructions.

target: arm-unknown-linux-gnueabihf

details: https:// pastebin.com/qJdTw49n

commit: https://github.com/tracyspacy/fli/commit/a87a98be77cc1972a53e6399716a227d1135e76b

Ask HN: Who is hiring? (July 2026)

226•whoishiring•1d ago•241 comments

Ask HN: Who wants to be hired? (July 2026)

138•whoishiring•1d ago•359 comments

Rust sort_unstable_by with more complex closure unexpectedly shrunk binary

3•tracyspacy•2h ago•0 comments

Ask HN: Why aren't companies hoarding AI talent?

2•playorizaya•2h ago•7 comments

Seattle Just Had an Earthquake

11•tobinfekkes•8h ago•6 comments

Tell HN: Old Reddit now requires login

76•jay_kyburz•18h ago•12 comments

Liberty and Absurdity in 2026

2•dranimalz•3h ago•9 comments

I'm opening VSCode less and less every day

18•othmanosx•16h ago•13 comments

Fable 5 is insanely good

11•vuphanse•9h ago•6 comments

Tell HN: Installing Cursor on iOS irreversibly changes your privacy settings

245•zkldi•1d ago•34 comments

Ask HN: What things might help me to become inference engineer?

3•chalshik•11h ago•3 comments

Are Claude models broken with the Fable 5 update?

7•jackjd•17h ago•2 comments

Ask HN: Who is quitting? (July 2026)

150•ethanwillis•3h ago•118 comments

Ask HN: Line by Line Agentic Coding

6•notshore•16h ago•4 comments

Fable 5 Is Downgraded

6•RIshabh235•4h ago•7 comments

Ask HN: Secure wrapper for coding agents?

19•rjzzleep•2d ago•18 comments

Ask HN: Am I the only who misses Nights and Weekends?

2•dhruv3006•4h ago•3 comments

Ask HN: What do you use computer mode for?

4•aryamaan•13h ago•0 comments

Tell HN: I'm not excited for Fable and am disappointed in Karpathy

6•behnamoh•19h ago•8 comments

Ask HN: Is anyone running local LLMs in their organization?

4•harry8•13h ago•0 comments

What Can't Fable Do?

3•alimhaq•17h ago•3 comments

Ask HN: Where is the programming profession going?

165•syntaxbush•1w ago•183 comments

Ask HN: Who is this Steve T.?

3•jacobreddy•19h ago•4 comments

0/6 major aerospace documentation portals are AI Agent-ready

2•priyanshu-j•20h ago•0 comments

Ask HN: Does anybody still FEEL improvements between latest LLMs for coding?

4•sspehr•1d ago•6 comments

The open source DOCX editor submitted to HN a few weeks ago has been deleted

108•gcanyon•5d ago•45 comments

Ask HN: Is "no source code was copied" still a sufficient copyright defense?

67•oscgam1•6d ago•82 comments

Ask HN: Is Codex with GPT 5.5 Extra High being dumbed down?

7•setnone•2d ago•9 comments

Ask HN: Do pull requests have value?

3•_RPM•17h ago•4 comments

You've reached the end!