frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Nano Banana Pro

https://blog.google/technology/ai/nano-banana-pro/
793•meetpateltech•9h ago•499 comments

Android and iPhone users can now share files, starting with the Pixel 10

https://blog.google/products/android/quick-share-airdrop/
390•abraham•7h ago•260 comments

New Glenn Update

https://www.blueorigin.com/news/new-glenn-upgraded-engines-subcooled-components-drive-enhanced-pe...
95•rbanffy•3h ago•42 comments

New OS aims to provide (some) compatibility with macOS

https://github.com/ravynsoft/ravynos
109•kasajian•4h ago•38 comments

FEX-emu – run x86 applications on ARM64 Linux devices

https://fex-emu.com/
29•open-paren•1w ago•5 comments

Over-Regulation Is Doubling the Cost by Peter Reinhardt

https://rein.pk/over-regulation-is-doubling-the-cost
30•bilsbie•1h ago•20 comments

Data-at-Rest Encryption in DuckDB

https://duckdb.org/2025/11/19/encryption-in-duckdb
112•chmaynard•5h ago•15 comments

GitHut – Programming Languages and GitHub (2014)

https://githut.info/
44•tonyhb•3h ago•16 comments

NTSB Preliminary Report – UPS Boeing MD-11F Crash [pdf]

https://www.ntsb.gov/Documents/Prelimiary%20Report%20DCA26MA024.pdf
119•gregsadetsky•6h ago•144 comments

The Lions Operating System

https://lionsos.org
108•plunderer•6h ago•21 comments

Readonly Characters Are a Big Deal

https://matklad.github.io/2025/11/10/readonly-characters.html
29•vinhnx•1w ago•2 comments

Okta's NextJS-0auth troubles

https://joshua.hu/ai-slop-okta-nextjs-0auth-security-vulnerability
207•ramimac•2d ago•74 comments

Microsoft makes Zork open-source

https://opensource.microsoft.com/blog/2025/11/20/preserving-code-that-shaped-generations-zork-i-i...
394•tabletcorry•6h ago•173 comments

Launch HN: Poly (YC S22) – Cursor for Files

39•aabhay•7h ago•41 comments

Free interactive tool that shows you how PCIe lanes work on motherboards

https://mobomaps.com
134•tagyro•1d ago•24 comments

Show HN: F32 – An Extremely Small ESP32 Board

https://github.com/PegorK/f32
176•pegor•1d ago•27 comments

Adversarial poetry as a universal single-turn jailbreak mechanism in LLMs

https://arxiv.org/abs/2511.15304
229•capgre•12h ago•120 comments

OOP is shifting between domains, not disappearing

https://blog.jsbarretto.com/post/actors
51•ibobev•4h ago•95 comments

Show HN: My hobby OS that runs Minecraft

https://astral-os.org/posts/2025/10/31/astral-minecraft.html
115•avaliosdev•3d ago•15 comments

Run Docker containers natively in Proxmox 9.1 (OCI images)

https://raymii.org/s/tutorials/Finally_run_Docker_containers_natively_in_Proxmox_9.1.html
92•jandeboevrie•3h ago•28 comments

Interactive World History Atlas Since 3000 BC

http://geacron.com/home-en/
282•not_knuth•14h ago•126 comments

Freer Monads, More Extensible Effects (2015) [pdf]

https://okmij.org/ftp/Haskell/extensible/more.pdf
74•todsacerdoti•9h ago•16 comments

What's in a Passenger Name Record (PNR)? (2013)

https://hasbrouck.org/articles/PNR.html
55•rzk•4d ago•13 comments

Prozac 'no better than placebo' for treating children with depression, experts

https://www.theguardian.com/society/2025/nov/20/prozac-no-better-than-placebo-for-treating-childr...
16•pseudolus•48m ago•4 comments

Mozilla says it's finally done with Onerep

https://krebsonsecurity.com/2025/11/mozilla-says-its-finally-done-with-two-faced-onerep/
99•todsacerdoti•5h ago•57 comments

Red Alert 2 in web browser

https://chronodivide.com/
389•nsoonhui•12h ago•126 comments

Go Cryptography State of the Union

https://words.filippo.io/2025-state/
120•ingve•7h ago•46 comments

Two recently found works of J.S. Bach presented in Leipzig [video]

https://www.youtube.com/watch?v=4hXzUGYIL9M#t=15m19s
88•Archelaos•3d ago•70 comments

France is taking state actions against GrapheneOS?

https://grapheneos.social/@GrapheneOS/115584160910016309
128•gabrielgio•1h ago•56 comments

Theft of 'The Weeping Woman' from the National Gallery of Victoria

https://en.wikipedia.org/wiki/Theft_of_The_Weeping_Woman_from_the_National_Gallery_of_Victoria
62•neom•5d ago•43 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