frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

For algorithms, a little memory outweighs a lot of time

https://www.quantamagazine.org/for-algorithms-a-little-memory-outweighs-a-lot-of-time-20250521/
173•makira•5h ago•32 comments

Should I Block ICMP?

http://shouldiblockicmp.com/
45•rascul•1h ago•23 comments

Show HN: Confidential computing for high-assurance RISC-V embedded systems

https://github.com/IBM/ACE-RISCV
67•mrnoone•4h ago•5 comments

ITXPlus: A ITX Sized Macintosh Plus Logicboard Reproduction

https://68kmla.org/bb/index.php?threads/itxplus-a-itx-sized-macintosh-plus-logicboard-reproduction.49715/
35•zdw•3h ago•6 comments

Rocky Linux 10 Will Support RISC-V

https://rockylinux.org/news/rockylinux-support-for-riscv
67•fork-bomber•4h ago•12 comments

Tales from Mainframe Modernization

https://oppi.li/posts/tales_from_mainframe_modernization/
7•todsacerdoti•54m ago•1 comments

Devstral

https://mistral.ai/news/devstral
352•mfiguiere•10h ago•74 comments

OpenAI to buy AI startup from Jony Ive

https://www.bloomberg.com/news/articles/2025-05-21/openai-to-buy-apple-veteran-jony-ive-s-ai-device-startup-in-6-5-billion-deal
612•minimaxir•7h ago•834 comments

Collaborative Text Editing Without CRDTs or OT

https://mattweidner.com/2025/05/21/text-without-crdts.html
176•samwillis•7h ago•49 comments

The curious tale of Bhutan's playable record postage stamps (2015)

https://thevinylfactory.com/features/the-curious-tale-of-bhutans-playable-record-postage-stamps/
79•ohjeez•6h ago•5 comments

Show HN: I've built online video editor

https://clipjs.vercel.app/
84•mohyware•5h ago•37 comments

The Machine Stops (1909)

https://standardebooks.org/ebooks/e-m-forster/short-fiction/text/the-machine-stops
37•xeonmc•3h ago•7 comments

Animated Factorization (2012)

http://www.datapointed.net/visualizations/math/factorization/animated-diagrams/
223•miniBill•10h ago•52 comments

Sorcerer (YC S24) Is Hiring a Lead Hardware Design Engineer

https://jobs.ashbyhq.com/sorcerer/6beb70de-9956-49b7-8e28-f48ea39efac6
1•maxmclau•3h ago

CERN gears up to ship antimatter across Europe

https://arstechnica.com/science/2025/05/cern-gears-up-to-ship-antimatter-across-europe/
39•ben_w•2d ago•10 comments

LLM function calls don't scale; code orchestration is simpler, more effective

https://jngiam.bearblog.dev/mcp-large-data/
147•jngiam1•7h ago•65 comments

An upgraded dev experience in Google AI Studio

https://developers.googleblog.com/en/google-ai-studio-native-code-generation-agentic-tools-upgrade/
91•meetpateltech•7h ago•50 comments

How we made iText's table rendering faster

https://kb.itextpdf.com/itext/how-i-made-pdf-table-rendering-faster
19•whizzx•2d ago•1 comments

London's Water Pumps: Where History Flows Freely

https://londonist.com/london/features/london-s-water-pump
12•joebig•3d ago•0 comments

Storefront Web Components

https://shopify.dev/docs/api/storefront-web-components
115•maltenuhn•7h ago•33 comments

Introducing the Llama Startup Program

https://ai.meta.com/blog/llama-startup-program/?_fb_noscript=1
146•mayalilpony10•8h ago•48 comments

Understanding the Go Scheduler

https://nghiant3223.github.io/2025/04/15/go-scheduler.html
99•gnabgib•3d ago•15 comments

Launch HN: SIM Studio (YC X25) – Figma-Like Canvas for Agent Workflows

46•waleedlatif1•9h ago•29 comments

The US has a new most powerful laser hitting 2 petawatts

https://news.engin.umich.edu/2025/05/the-us-has-a-new-most-powerful-laser/
86•voxadam•9h ago•94 comments

By default, Signal doesn't recall

https://signal.org/blog/signal-doesnt-recall/
416•feross•8h ago•313 comments

µPC: Scaling Predictive Coding to 100 Layer Networks

https://arxiv.org/abs/2505.13124
14•frozenseven•5h ago•0 comments

What Is the Difference Between a Block, a Proc, and a Lambda in Ruby? (2013)

https://blog.awaxman.com/what-is-the-difference-between-a-block-a-proc-and-a-lambda-in-ruby
68•Tomte•3d ago•22 comments

'Turbocharged' Mitochondria Power Birds' Epic Migratory Journeys

https://www.quantamagazine.org/turbocharged-mitochondria-power-birds-epic-migratory-journeys-20250519/
87•rbanffy•10h ago•67 comments

Possible new dwarf planet found in our solar system

https://www.minorplanetcenter.net/mpec/K25/K25K47.html
98•ddahlen•6h ago•68 comments

Lune: Standalone Luau Runtime

https://github.com/lune-org/lune
66•erlend_sh•10h ago•38 comments
Open in hackernews

Link Time Optimizations: New Way to Do Compiler Optimizations

https://johnnysswlab.com/link-time-optimizations-new-way-to-do-compiler-optimizations/
35•signa11•2d ago

Comments

sakex•8h ago
Maybe add the date to the title, because it's hardly new at this point
vsl•8h ago
...or in 2020 (the year of the article).
Deukhoofd•8h ago
What do you mean, new? LTO has been in GCC since 2011. It's old enough to have a social media account in most jurisdictions.
jeffbee•7h ago
Pretty sure MSVC ".NET" was doing link-time whole-program optimization in 2001.
andyayers•7h ago
HPUX compilers were doing this back in 1993.
jeffbee•7h ago
Oh yeah, well ... actually I got nothin'. You win.

I will just throw in some nostalgia for how good that compiler was. My college roommate brought an HP pizza box that his dad secured from HP, and the way the C compiler quoted chapter and verse from ISO C in its error messages was impressive.

abainbridge•7h ago
Or academics in 1986: https://dl.acm.org/doi/abs/10.1145/13310.13338

The idea of optimizations running at different stages in the build, with different visibility of the whole program, was discussed in 1979, but the world was so different back then that the discussion seems foreign. https://dl.acm.org/doi/pdf/10.1145/872732.806974

srean•7h ago
Yes and if I remember correctly there used to be Linux distros that had all the distro binaries LTO'ed.
phkahler•7h ago
I tried LTO with Solvespace 4 years ago and got about 15 percent better performance:

https://github.com/solvespace/solvespace/issues/972

Build time was terrible taking a few minutes vs 30-40 seconds for a full build. Have they done anything to use multi-core for LTO? It only used one core for that.

Also tested OpenMP which was obviously a bigger win. More recently I ran the same test after upgrading from an AMD 2400G to a 5700G which has double the cores and about 1.5x the IPC. The result was a solid 3x improvement so we scale well with cores going from 4 to 8.

wahern•7h ago
Both clang and GCC support multi-core LTO, as does Rust. However, you have to partition the code, so the more cores you use the less benefit to LTO. Rust partitions by crate by default, but it can increase parallelism by partitioning each crate. I think "fat LTO" is the term typically used for whole-program, or at least in the case of Rust, whole-crate LTO, whereas "thin LTO" is what you get when you LTO partitions and then link those together normally. For clang and GCC, you can either have them automatically partition the code for thin LTO , or do it explicitly via your Makefile rules[1].

[1] Interestingly, GCC actually invokes Make internally to implement thin LTO, which lets it play nice with GNU Make's job control and obey the -j switch.

WalterBright•7h ago
Link time optimizations were done in the 1980s if I recall correctly.

I never tried to implement them, finding it easier and more effective for the compiler to simply compile all the source files at the same time.

The D compiler is designed to be able to build one object file per source file at a time, or one object file which combines all of the source files. Most people choose the one object file.

srean•7h ago
I think MLton does it this way.

http://mlton.org/WholeProgramOptimization

Dynamically linked and dynamically loaded libraries are useful though (paid for with its problems of course)

tester756•5h ago
Yea, generating many object files seems like weird thing. Maybe it was good thing decades ago, but now?

Because then you need to link them, thus you need some kind of linker.

Just generate one output file and skip the linker

WalterBright•4h ago
I've considered many times doing just that.
tester756•4h ago
And what was the result/conclusion of such considerations?
WalterBright•1h ago
Not worth the effort.

1. linkers have increased enormously in complexity

2. little commonality between linkers for different platforms

3. compatibility with the standalone linkers

4. trying to keep up with constant enhancement of existing linkers

yencabulator•4h ago
Not maybe. Sufficient RAM for compilation was a serious issue back in the day.
kazinator•56m ago
Sure, and if any file is touched, just process them all.
senkora•3h ago
In C++, there is a trick to get this behavior called "unity builds", where you include all of your source files into a single file and then invoke the compiler on that file.

Of course, being C++, this subtly changes behavior and must be done carefully. I like this article that explains the ins and outs of using unity builds: https://austinmorlan.com/posts/unity_jumbo_build/

WalterBright•1h ago
> this subtly changes behavior

The D module design ensures that module imports are independent of each other and are independent of the importer.

YorickPeterse•27m ago
For Inko (https://inko-lang.org/) I went a step further: it generates an object file for each type, instead of per source file or per project. The idea is that if e.g. a generic type is specialized into a new instance (or has some methods added to it), only the object file for that type needs to be re-generated. This in turn should allow for much more fine-grained incremental compilation.

The downside is that you can end up with thousands of object files, but for modern linkers that isn't a problem.

Remnant44•7h ago
Link time optimization is definitely not new, but it is incredibly powerful - I have personally had situations where the failure to be able to inline functions from a static library without lto cut performance in half.

It's easy to dismiss a basic article like this, but it's basically a discovery that every Junior engineer will make, and it's useful to talk about those too!

srean•6h ago
The inline keyword should really have been intended for call sites rather than definitions.

Perhaps language designers thought that if a function needs to be inlined everywhere, it would lead to verbose code. In any case, it's a weak hint that compilers generally treat with much disdain.

lilyball•2h ago
ffmpeg has a lot of assembly code in it, so it's a very odd choice of program to use for this kind of test as LTO is presumably not going to do anything to the assembly.
mcdeltat•1h ago
Different .c/.cpp files being a barrier to optimisation always struck me as an oddly low bar for the 21st century. Yes I know the history of compilation units but these days that's not how we use the system. We don't split code into source files for memory reasons, we do it for organisation. On a small/medium codebase and a decent computer you could probably fit dozens of source files into memory to compile and optimise together. The memory constraint problem has largely disappeared.

So why do we still use the old way? LTO seems effectively like a hack to compensate for the fact that the compilation model doesn't fit our modern needs. Obviously this will never change in C/C++ due to momentum and backwards compatibility. But a man can dream.

kazinator•57m ago
LTO breaks code which assumes that the compiler has no idea what is behind an external function call and must not assume anything about the values of objects that the code might have access to:

    securely_wipe_memory(&obj, sizeof obj);
    return;
  }
Compiler peeks into securely_wipe_memory and sees that it has no effect because obj is a local variable which has no "next use" in the data flow graph. Thus the call is removed.

Another example:

    gc_protect(object);
    return
  }
Here, gc_protect is an empty function. Without LTO, the compiler must assume that the value of object is required for the gc_protect call and so the generated code has to hang on to that value until that call is made. With LTO, the compiler peeks at the definition of gc_protect and sees the ruse: the function is empty! Therefore, that line of code does not represent a use of the variable. The generated code can use the register or memory location for something else long before that line. If the garbage collector goes off in that part of the code, the object is prematurely collected (if what was lost happens to be the last reference to it).

Some distros have played with turning on LTO as a default compiler option for building packages. It's a very, very bad idea.