frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

AV1 – Now Powering 30% of Netflix Streaming

https://netflixtechblog.com/av1-now-powering-30-of-netflix-streaming-02f592242d80
141•CharlesW•2h ago•60 comments

BMW PHEV: When EU engineering becomes a synonym for "unrepairable" (EV Clinic)

https://evclinic.eu/2025/12/04/2021-phev-bmw-ibmucp-21f37e-post-crash-recovery-when-eu-engineerin...
47•mikelabatt•1h ago•4 comments

Trick users and bypass warnings – Modern SVG Clickjacking attacks

https://lyra.horse/blog/2025/12/svg-clickjacking/
37•spartanatreyu•2h ago•5 comments

CUDA-l2: Surpassing cuBLAS performance for matrix multiplication through RL

https://github.com/deepreinforce-ai/CUDA-L2
81•dzign•5h ago•11 comments

The Ofcom Files, Part 4: Ofcom Rides Again

https://prestonbyrne.com/2025/12/04/the-ofcom-files-part-4-ofcom-rides-again/
29•parliament32•1h ago•2 comments

State of AI: An Empirical 100T Token Study with OpenRouter

https://openrouter.ai/state-of-ai
115•anjneymidha•3h ago•45 comments

NeurIPS best paper awards 2025

https://blog.neurips.cc/2025/11/26/announcing-the-neurips-2025-best-paper-awards/
8•ivansavz•1h ago•1 comments

Multivox: Volumetric Display

https://github.com/AncientJames/multivox
231•jk_tech•9h ago•30 comments

Brussels writes so many laws

https://www.siliconcontinent.com/p/how-brussels-writes-so-many-laws
9•amadeuspagel•42m ago•5 comments

It’s time to free JavaScript (2024)

https://javascript.tm/letter
660•pavelai•17h ago•335 comments

Transparent leadership beats servant leadership

https://entropicthoughts.com/transparent-leadership-beats-servant-leadership
373•ibobev•12h ago•180 comments

StardustOS: Library operating system for building light-weight Unikernels

https://github.com/StardustOS
26•transpute•3h ago•1 comments

Thoughts on Go vs. Rust vs. Zig

https://sinclairtarget.com/blog/2025/08/thoughts-on-go-vs.-rust-vs.-zig/
229•yurivish•4h ago•231 comments

Why are 38 percent of Stanford students saying they're disabled?

https://reason.com/2025/12/04/why-are-38-percent-of-stanford-students-saying-theyre-disabled/
485•delichon•8h ago•723 comments

How elites could shape mass preferences as AI reduces persuasion costs

https://arxiv.org/abs/2512.04047
495•50kIters•17h ago•483 comments

Django 6

https://docs.djangoproject.com/en/6.0/releases/6.0/
231•wilhelmklopp•5h ago•113 comments

We gave 5 LLMs $100K to trade stocks for 8 months

https://www.aitradearena.com/research/we-ran-llms-for-8-months
158•cheeseblubber•3h ago•139 comments

Help, My Java Object Vanished (and the GC Is Not at Fault)

https://arraying.de/posts/markword/
23•birdculture•5d ago•2 comments

Oedipus is about the act of figuring out what Oedipus is about

https://interconnected.org/home/2025/11/07/oedipus
3•surprisetalk•5d ago•0 comments

Show HN: Onlyrecipe 2.0 – I added all features HN requested – 4 years later

https://onlyrecipeapp.com/?url=https://www.allrecipes.com/turkish-pasta-recipe-8754903
133•AwkwardPanda•11h ago•108 comments

PyTogether: Collaborative lightweight real-time Python IDE for teachers/learners

https://github.com/SJRiz/pytogether
63•indigodaddy•8h ago•18 comments

I ignore the spotlight as a staff engineer

https://lalitm.com/software-engineering-outside-the-spotlight/
419•todsacerdoti•14h ago•200 comments

Converge (YC S23) is hiring a martech expert in NYC

https://www.runconverge.com/careers/technical-customer-success-manager
1•janhenr•9h ago

Fighting the age-gated internet

https://www.wired.com/story/age-verification-is-sweeping-the-us-activists-are-fighting-back/
172•geox•12h ago•165 comments

A Cozy Mk IV light aircraft crashed after 3D-printed part was weakened by heat

https://www.bbc.com/news/articles/c1w932vqye0o
222•toss1•5h ago•176 comments

What is better: a lookup table or an enum type?

https://www.cybertec-postgresql.com/en/lookup-table-or-enum-type/
8•todsacerdoti•2h ago•2 comments

CSS now has an if() conditional function

https://caniuse.com/?search=if
34•aanthonymax•5d ago•8 comments

Autism should not be treated as a single condition

https://www.economist.com/science-and-technology/2025/12/03/why-autism-should-not-be-treated-as-a...
208•bookofjoe•9h ago•262 comments

Feynman vs. Computer

https://entropicthoughts.com/feynman-vs-computer
67•cgdl•10h ago•22 comments

PGlite – Embeddable Postgres

https://pglite.dev/
510•dsego•15h ago•103 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