frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

πFS

https://github.com/philipl/pifs
284•helterskelter•3h ago•75 comments

Organic foods are not healthier or pesticide free

https://news.immunologic.org/p/organic-foods-are-not-healthieror
30•fsflover•45m ago•30 comments

How JPL keeps the 13-year-old Curiosity rover doing science

https://spectrum.ieee.org/curiosity-rover-jpl-mars-science
125•pseudolus•4h ago•20 comments

What Is It Like to Be a Bat? [pdf] (1974)

https://www.sas.upenn.edu/~cavitch/pdf-library/Nagel_Bat.pdf
36•shadow28•1h ago•26 comments

I'm Eric Ries, author of "The Lean Startup" and new book "Incorruptible" – AMA

453•eries•7h ago•376 comments

PgDog is funded and coming to a database near you

https://pgdog.dev/blog/our-funding-announcement
346•levkk•8h ago•172 comments

L'Affaire Siloxane

https://mceglowski.substack.com/p/laffaire-siloxane
106•idlewords•1d ago•18 comments

GeoLibre 1.0

https://geolibre.app/
90•jonbaer•4h ago•6 comments

Farmer donates land for a park, city sells it for $10M as data center land

https://www.tomshardware.com/tech-industry/farmer-donates-land-for-a-park-city-sells-it-for-data-...
230•maxloh•3h ago•62 comments

Mercedes‑Benz starts large‑scale production of electric axial flux motor

https://media.mercedes-benz.com/en/article/bebac2af-acdc-465a-9538-adb0bf3d8ccf
486•raffael_de•14h ago•302 comments

Show HN: Extend UI – open-source UI kit for modern document apps

https://www.extend.ai/ui
93•kbyatnal•6h ago•18 comments

Show HN: HelixDB – A graph database built on object storage

https://github.com/HelixDB/helix-db/tree/main
75•GeorgeCurtis•6h ago•29 comments

Building an HTML-first site doubled our users overnight

https://mohkohn.co.uk/writing/html-first/
926•edent•9h ago•423 comments

Anthropic's Model Naming, Extrapolated

https://samwilkinson.io/posts/2026-06-09-anthropics-model-naming-extrapolated
231•sammycdubs•3h ago•62 comments

Authentication issues related to API requests

https://www.githubstatus.com/incidents/fcj3088jg1wx
147•Multicomp•6h ago•27 comments

Claude Desktop spawns 1.8 GB Hyper-V VM on every launch, even for chat-only use

https://github.com/anthropics/claude-code/issues/29045
283•tonyrice•5h ago•196 comments

Apache Burr: Build reliable AI agents and applications

https://burr.apache.org/
152•anhldbk•7h ago•84 comments

Raspberry Pi 5 – 16 GB, $350

https://www.adafruit.com/product/6125?src=raspberrypi
95•akman•2h ago•111 comments

Show HN: Atlasphere – Live Infrastructure Diagrams

15•andreygrehov•1d ago•3 comments

Show HN: Artie – Real-time data replication to your warehouse, now self-serve

https://www.artie.com
16•tang8330•16h ago•5 comments

All 9,300 Japanese train station, animated by the year it opened (1872–2026)

https://jivx.com/eki
172•momentmaker•10h ago•60 comments

Pick and Place: Carbon Nanotube Nanoassembly Process

https://www.c12qe.com/news/pick-and-place-carbon-nanotube-quantum-chip-manufacturing
15•bpierre•2d ago•3 comments

Smudging the game disc to make speedrunning 'SpongeBob' faster

https://www.inverse.com/input/gaming/the-dirty-secret-that-makes-speedrunning-on-spongebob-a-lot-...
56•pncnmnp•19h ago•33 comments

A €0.01 bank transfer could compromise a banking AI agent

https://blue41.com/blog/how-we-helped-bunq-secure-their-financial-ai-assistant/
151•tvissers•8h ago•131 comments

DiffusionGemma: 4x Faster Text Generation

https://blog.google/innovation-and-ai/technology/developers-tools/diffusion-gemma-faster-text-gen...
246•meetpateltech•6h ago•62 comments

The Abundance Illusion

https://www.carlyle.com/carlyle-compass/the-abundance-illusion
57•cwal37•2h ago•26 comments

'They take you out of life, out of time': a journey into Spain's cave paintings

https://www.theguardian.com/science/2026/jun/02/journey-into-spain-palaeolithic-cave-paintings-al...
60•NaOH•2d ago•25 comments

Who Runs Your Rust Future? Hands-On Intro to Async Rust

https://aibodh.com/posts/async-rust-chapter-1-hands-on-intro-to-async-rust/
91•febin•2d ago•20 comments

Meta steals a tactic from Tesla and builds data centers in tents

https://techcrunch.com/2026/06/04/meta-steals-a-tactic-from-tesla-and-builds-data-centers-in-tents/
82•gnabgib•4h ago•89 comments

Buy a train, bridge or tracks from the Swiss Railway

https://sbbresale.ch/
162•kisamoto•2d ago•91 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/
39•signa11•1y ago

Comments

sakex•1y ago
Maybe add the date to the title, because it's hardly new at this point
vsl•1y ago
...or in 2020 (the year of the article).
Deukhoofd•1y 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•1y ago
Pretty sure MSVC ".NET" was doing link-time whole-program optimization in 2001.
andyayers•1y ago
HPUX compilers were doing this back in 1993.
jeffbee•1y 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•1y 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•1y ago
Yes and if I remember correctly there used to be Linux distros that had all the distro binaries LTO'ed.
phkahler•1y 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•1y 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•1y 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•1y 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•1y 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•1y ago
I've considered many times doing just that.
tester756•1y ago
And what was the result/conclusion of such considerations?
WalterBright•
Remnant44•1y 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•1y 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•1y 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•1y 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•1y 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.

djmips•1y ago
So slow
jordiburgos•1y ago
Any idea on the performance improvements with these LTO?
1y 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•1y ago
Not maybe. Sufficient RAM for compilation was a serious issue back in the day.
kazinator•1y ago
Sure, and if any file is touched, just process them all.
adrian_b•1y ago
Some compilers had incremental compilation to handle this during development builds.

Then only the functions touched inside some file would be recompiled, not the remainder of the file or other files.

Obviously, choosing incremental compilation inhibited some optimizations.

adrian_b•1y ago
Generating many object files is pointless for building an executable or a dynamic library, but it remains the desired behavior for building a static library.

Many software projects that must generate multiple executables are better structured as a static library plus one source file with the "main" function for each executable.

WalterBright•1y ago
One thing the D compiler does is it can generate a library in one step (no need to use the librarian). Give a bunch of source files and object files on the command line, specify a library as the output, and boom! library created directly (compiling the source files, and adding the object files).

I haven't used a librarian program for maybe a decade.

senkora•1y 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•1y 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•1y 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.

dooglius•1y ago
It sounds like this would prevent the inherit concurrency you would get out of handling files separately?
WalterBright•1y ago
It's complicated and not at all clear. For example, most modules import other modules. With separate compilation, most of the modules need to be compiled multiple times, with all-together, it's only once.

On the other hand, the optimizer and code generator can be run concurrently in multiple processes/threads.