frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

DeepSeek-v3.2: Pushing the frontier of open large language models [pdf]

https://huggingface.co/deepseek-ai/DeepSeek-V3.2/resolve/main/assets/paper.pdf
581•pretext•10h ago•275 comments

India orders smartphone makers to preload state-owned cyber safety app

https://www.reuters.com/sustainability/boards-policy-regulation/india-orders-mobile-phones-preloa...
472•jmsflknr•20h ago•260 comments

AI agents find $4.6M in blockchain smart contract exploits

https://red.anthropic.com/2025/smart-contracts/
80•bpierre•3h ago•49 comments

Arcee Trinity Mini: US-Trained Moe Model

https://www.arcee.ai/blog/the-trinity-manifesto?src=hn
24•hurrycane•2h ago•5 comments

Last Week on My Mac: Losing confidence

https://eclecticlight.co/2025/11/30/last-week-on-my-mac-losing-confidence/
246•frizlab•3h ago•100 comments

Netherlands to start taxing unrealized capital gains yearly from 2028

https://kpmg.com/xx/en/our-insights/gms-flash-alert/flash-alert-2025-116.html
7•ivankra•25m ago•2 comments

Ghostty compiled to WASM with xterm.js API compatibility

https://github.com/coder/ghostty-web
250•kylecarbs•8h ago•78 comments

Ask HN: Who is hiring? (December 2025)

222•whoishiring•10h ago•300 comments

Why xor eax, eax?

https://xania.org/202512/01-xor-eax-eax
501•hasheddan•14h ago•189 comments

Tested: 1981 Datsun 280ZX Turbo

https://www.caranddriver.com/reviews/a69529696/1981-datsun-280-zx-turbo-archive-test/
8•RickJWagner•2d ago•6 comments

Cartographers have been hiding illustrations inside Switzerland’s maps (2020)

https://eyeondesign.aiga.org/for-decades-cartographers-have-been-hiding-covert-illustrations-insi...
254•mhb•13h ago•52 comments

Google, Nvidia, and OpenAI

https://stratechery.com/2025/google-nvidia-and-openai/
113•tambourine_man•11h ago•105 comments

Codex, Opus, Gemini try to build Counter Strike

https://www.instantdb.com/essays/agents_building_counterstrike
94•stopachka•3d ago•21 comments

Google unkills JPEG XL?

https://tonisagrista.com/blog/2025/google-unkills-jpegxl/
256•speckx•11h ago•204 comments

Instagram chief orders staff back to the office five days a week in 2026

https://www.businessinsider.com/instagram-chief-adam-mosseri-announces-five-day-office-return-202...
136•mfiguiere•5h ago•162 comments

John Giannandrea to Retire from Apple

https://www.apple.com/newsroom/2025/12/john-giannandrea-to-retire-from-apple/
36•robbiet480•4h ago•222 comments

10 years of writing a blog nobody reads

https://flowtwo.io/post/on-10-years-of-writing-a-blog-nobody-reads
127•thejoeflow•4d ago•64 comments

The Penicillin Myth

https://www.asimov.press/p/penicillin-myth
139•surprisetalk•12h ago•74 comments

Durin is a library for reading and writing the Dwarf debugging format

https://github.com/tmcgilchrist/durin
52•mooreds•8h ago•13 comments

Around The World, Part 27: Planting trees

https://frozenfractal.com/blog/2025/11/28/around-the-world-27-planting-trees/
6•ibobev•2h ago•0 comments

Mozilla's latest quagmire

https://rubenerd.com/mozillas-latest-quagmire/
96•nivethan•5h ago•65 comments

Ask HN: Who wants to be hired? (December 2025)

110•whoishiring•10h ago•212 comments

Self-hosting a Matrix server for 5 years

https://yaky.dev/2025-11-30-self-hosting-matrix/
242•the-anarchist•15h ago•117 comments

Ask HN: Quality of recent gens of Dell/Lenovo laptops worse than 10 years ago?

52•ferguess_k•11h ago•72 comments

A vector graphics workstation from the 70s

https://justanotherelectronicsblog.com/?p=1429
152•ibobev•13h ago•41 comments

Better Auth (YC X25) Is Hiring

https://www.ycombinator.com/companies/better-auth/jobs/eKk5nLt-developer-relation-engineer
1•bekacru•9h ago

Amazon faces FAA probe after delivery drone snaps internet cable in Texas

https://www.cnbc.com/2025/11/25/amazon-faa-probe-delivery-drone-incident-texas.html
131•jonathanzufi•5d ago•102 comments

Sycophancy is the first LLM "dark pattern"

https://www.seangoedecke.com/ai-sycophancy/
129•jxmorris12•6h ago•78 comments

High-income job losses are cooling housing demand

https://jbrec.com/insights/job-growth-housing-demand-metro-analysis-2026/
232•gmays•8h ago•401 comments

Why I stopped using JSON for my APIs

https://aloisdeniel.com/blog/better-than-json
67•barremian•7h ago•82 comments
Open in hackernews

Optimizing Heap Allocations in Go: A Case Study

https://www.dolthub.com/blog/2025-04-18-optimizing-heap-allocations/
54•ingve•7mo ago

Comments

returningfory2•7mo ago
> It's possible that this is a compiler bug. It's also possible that there's some fringe case where the reference actually can escape via that method call, and the compiler doesn't have enough context to rule it out.

Here's an example, I think: suppose the method spawns a new goroutine that contains a reference to `chunkStore`. This goroutine can outlive the `ReadBytes` function call, and thus Go has to heap allocate the thing being referenced.

In general, this kind of example makes me suspect that Go's escape analysis algorithm treats any method call as a black box and heap allocates anything being passed to it by reference.

athorax•7mo ago

  The notion of stack vs heap allocation isn't something that even exists in the language. Users are expected to not worry about it... until, of course, until you're optimizing performance and you need to worry about it.
This is one of the best and worst aspects with Go. Anyone can write pretty performant code without having to understand the underlying memory model. If you get to the point where you are trying to optimize at this level, the benefits of using a more approachable language start to fall apart and you spend more time chasing implementation details.
nu11ptr•7mo ago
In general, it is a win, since it lets you code faster and 80-90% the performance doesn't matter. Over time, you learn generally what leads to heap allocs and what doesn't. In rare hot spot, using -m will show you the allocations and you can optimize.
athorax•7mo ago
I would generally agree. It's good enough performance for most applications. For those that it isn't fast enough for (even with optimizations like these), it still allows for rapid prototyping to arrive at that conclusion.
Ygg2•7mo ago
I think same applies to any GC language. Ride is fun until GC starts either taking too much time, too much memory or taking too much of CPU.
Thaxll•7mo ago
At least you have the tools to understand where things get allocated.
38•7mo ago
instead of this:

    t.Buf = []byte{}
you can just do:

    t.Buf = nil
rsc•7mo ago
Those are semantically different (one is nil and one is not) but neither allocates.
virexene•7mo ago
I wonder if the reason the escape analysis fails could be that, for small enough types, the concrete value is directly inlined inside the interface value, instead of the latter being "a smart pointer" as the author said. So when the compiler needs to take a reference to the concrete value in `vs.chunkStore`, that ends up as an internal pointer inside the `vs` allocation, requiring it to be on the heap.

Either that or the escape analysis just isn't smart enough; taking a pointer to an internal component of an interface value seems like a bit of a stretch.

Snawoot•7mo ago
I had an attempt to improve performance of memory allocation with the use of arenas in Go and I chose freelist datastructure[1]

It almost doesn't use unsafe except one line to cast pointer types. I measured practical performance boost with "container/list" implementation hooked to my allocator. All in all it performs 2-5 times faster or up to 10 times faster if we can get rid[2] of any and allocations implied by the use of it.

All in all, heap allocations can be not that bad at all if you approach them from another angle.

[1]: https://github.com/Snawoot/freelist

[2]: https://github.com/Snawoot/list