Most active commenters
  • saagarjha(4)
  • estebank(3)
  • paulddraper(3)
  • zelcon(3)
  • Defletter(3)
  • amszmidt(3)

←back to thread

383 points hkalbasi | 73 comments | | HN request time: 3.394s | source | bottom
1. pzmarzly ◴[] No.42815005[source]
Ever since mold relicensed from AGPL to MIT (as part of mold 2.0 release), the worldwide need for making another fast linker has been greatly reduced, so I wasn't expecting a project like this to appear. And definitely wasn't expecting it to already be 2x faster than mold in some cases. Will keep an eye on this project to see how it evolves, best of luck to the author.
replies(5): >>42815102 #>>42815606 #>>42816517 #>>42819089 #>>42819826 #
2. secondcoming ◴[] No.42815102[source]
Maybe I'm holding it wrong, but mold isn't faster at all if you're using LTO, which you probably should be.
replies(6): >>42815189 #>>42815221 #>>42815904 #>>42816102 #>>42816403 #>>42840365 #
3. 0x457 ◴[] No.42815189[source]
I think we're talking about non-release builds here. In those, you don't want to use LTO, you just want to get that binary as fast as possible.
4. ◴[] No.42815221[source]
5. estebank ◴[] No.42815606[source]
Note that Mold has no interest in becoming incremental, so there is a big reason there for another linker to exist. I find it kind of embarrassing that MS' linker has been incremental by default for decades, yet there's no production ready incremental linker on Linux yet.
replies(4): >>42816198 #>>42817110 #>>42817268 #>>42818469 #
6. compiler-guy ◴[] No.42815904[source]
Mold will be faster than LLD even using LTO, but all of its benefits will be absolutely swamped by the LTO process, which is, more or less, recompiling the entire program from high-level LLVM-IR. That's extremely expensive and dwarfs any linking advantages.

So the benefit will be barely noticable. As another comment points out, LTO should only be used when you need a binary optimized to within an inch of its life, such as a release copy, or a copy for performance testing.

replies(1): >>42817272 #
7. Arelius ◴[] No.42816102[source]
Yeah, if you're development process requires LTO you may be holding it wrong....

Specifically, if LTO is so important that you need to be using it during development, you likely have a very exceptional case, or you have some big architectural issues that are causing much larger performance regressions then they should be.

replies(4): >>42816339 #>>42816648 #>>42823665 #>>42824951 #
8. Thorrez ◴[] No.42816228{3}[source]
I'm pretty sure that's a typo, and "incremental" was meant to be included in that sentence.
replies(1): >>42816368 #
9. benatkin ◴[] No.42816339{3}[source]
Being able to choose a middle ground between development/debug builds and production builds is becoming increasingly important. This is especially true when developing in the browser, when often something appears to be slow in development mode but is fine in production mode.

WebAssembly and lightweight MicroVMs are enabling FaaS with real time code generation but the build toolchain makes it less appealing, when you don't want it to take half a minute to build or to be slow.

10. estebank ◴[] No.42816368{4}[source]
Yes, indeed I accidentally forgot about incremental there.
11. bdhcuidbebe ◴[] No.42816383{3}[source]
Why so hostile? Have a break, go look at the clouds, they are beautiful today!
12. estebank ◴[] No.42816389{3}[source]
Yes, I missed a word. And I believe pretty much everybody else realized what I meant to say.

Feel free to point me in the direction of a production grade incremental compiler that can run on Linux, GNU or otherwise.

13. benatkin ◴[] No.42816403[source]
Agreed. Both fast and small are desirable for sandboxed (least authority) isomorphic (client and server) microservices with WebAssembly & related tech.
14. easythrees ◴[] No.42816517[source]
Wait a minute, it’s possible to relicense something from GPL to MIT?
replies(2): >>42816559 #>>42817285 #
15. DrillShopper ◴[] No.42816559[source]
Yes. Generally you need permissions from contributors (either asking them directly or requiring a contribution agreement that assigns copyright for contributions to either the author or the org hosting the project), but you can relicense from any license to any other license.

That doesn't extinguish the prior versions under the prior license, but it does allow a project to change its license.

16. dang ◴[] No.42816580{3}[source]
"Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith."

https://news.ycombinator.com/newsguidelines.html

17. jcalvinowens ◴[] No.42816648{3}[source]
If you're debugging, and your bug only reproduces with LTO enabled, you don't have much of a choice...
replies(1): >>42817282 #
18. pjmlp ◴[] No.42817110[source]
Additionally the way precompiled headers are handled in Visual C++ and C++ Builder have always been much better than traditional UNIX compilers, and now we have modules as well.
replies(1): >>42820853 #
19. paulddraper ◴[] No.42817268[source]
It has to be a candidate for the longest biggest gap in build tooling ever.
20. paulddraper ◴[] No.42817272{3}[source]
Username checks out.

And factual.

replies(1): >>42819468 #
21. paulddraper ◴[] No.42817282{4}[source]
Sure, for that 1% of the time.
replies(1): >>42817685 #
22. prmoustache ◴[] No.42817285[source]
Yes if you are the only developper and never received nor accepted external contributions or if you managed to get permission from every single person who contributed or replaced their code with your own.
replies(1): >>42817374 #
23. computably ◴[] No.42817374{3}[source]
> or if you managed to get permission from every single person who contributed

This makes it sound more difficult than it actually is (logistically); it's not uncommon for major projects to require contributors to sign a CLA before accepting PRs.

replies(3): >>42817562 #>>42824459 #>>42824486 #
24. mrighele ◴[] No.42817562{4}[source]
That depends on how old and big is the project. For example Linux is "stuck" on GPL2 and even if they wanted to move to something else it wouldn't be feasible to get permission from all the people involved. Some contributors passed away making it even more difficult.
replies(1): >>42817874 #
25. thesz ◴[] No.42817685{5}[source]
...which takes these remaining 99% of a development time...
replies(1): >>42819472 #
26. LeFantome ◴[] No.42817874{5}[source]
Not exactly “stuck” since they very explicitly do not want to move to GPL 3.
replies(1): >>42821244 #
27. jcelerier ◴[] No.42818469[source]
OTOH even lld, fast but fairly slower than mold, is already incredibly faster than MS's linker even without the incrmeentality. Like, I'm routinely linking hundreds of megabytes in less than a second anyways, not sure incrementality is that much worth it
replies(1): >>42818743 #
28. cyco130 ◴[] No.42818743{3}[source]
Not a rhetorical question: Could it be that part of the speed difference is due to the file system speed? I was shocked when I saw how much modern(ish) Windows file systems were slower than modern(ish) Linux ones.
replies(2): >>42819213 #>>42822889 #
29. panzi ◴[] No.42819089[source]
Why does AGPL Vs MIT matter for a linker?
replies(4): >>42819229 #>>42819957 #>>42820650 #>>42821513 #
30. leeoniya ◴[] No.42819213{4}[source]
it's usually windows defender and virus scanning that causes these massive slowdowns.
replies(2): >>42819849 #>>42820396 #
31. zelcon ◴[] No.42819229[source]
Corps don't want to have to release the source code for their internal forks. They could also potentially be sued for everything they link using it because the linked binaries could be "derivative works" according to a judge who doesn't know anything.
replies(2): >>42819466 #>>42820180 #
32. saagarjha ◴[] No.42819466{3}[source]
I think you should get new lawyers if this is their understanding of how software licenses work.
replies(2): >>42819928 #>>42825830 #
33. saagarjha ◴[] No.42819468{4}[source]
I'm waiting for 'linker-guy to weigh in, personally.
34. saagarjha ◴[] No.42819472{6}[source]
Surely your LTO bugs are not so easy to fix that they take less time to resolve than linking itself does.
35. integricho ◴[] No.42819826[source]
what is the status of Windows support in mold? reading the github issues leads to a circular confusion, the author first planned to support it, then moved Windows support to the sold linker, but then sold got archived recently so in the end there is no Windows support or did I just misunderstand the events?
36. berti ◴[] No.42819849{5}[source]
That’s exactly the problem “Dev Drive” is intended to solve I believe. I haven’t tried it myself.

https://learn.microsoft.com/en-us/windows/dev-drive/

replies(1): >>42821567 #
37. mgsloan2 ◴[] No.42819928{4}[source]
See for example https://opensource.google/documentation/reference/using/agpl...

> Code licensed under the GNU Affero General Public License (AGPL) MUST NOT be used at Google.

replies(1): >>42819962 #
38. o11c ◴[] No.42819957[source]
Corps want to be able to release and use tools that take away the freedoms that GPL-family licenses provide. Often this results in duplication of effort.

This is not theoretical; it happens quite frequently. For toolchains, in particular I'm aware of how Apple (not that they're unique in this) has "blah blah open source" downloads, but often they do not actually correspond with the binaries. And not just "not fully reproducible but close" but "entirely new and incompatible features".

The ARM64 saga is a notable example, which went on for at least six months (at least Sept 2013 to March 2014). XCode 5 shipped with a closed-source compiler only for all that time.

replies(1): >>42820078 #
39. jenadine ◴[] No.42819962{5}[source]
It’s their loss
replies(1): >>42820578 #
40. oguz-ismail ◴[] No.42820078{3}[source]
So they donate money instead of code? The project somehow benefits from the switch to MIT?
41. pwdisswordfishz ◴[] No.42820180{3}[source]
They don't have to release source for internal forks.
replies(1): >>42821477 #
42. miki123211 ◴[] No.42820396{5}[source]
And as a result of this, if you want to optimize your program to be fast on Windows, you will make very different optimization decisions than on other platforms.

For example, Windows runs virus scans on close(), which makes it very slow. This means that sometimes it makes sense to have one or more background threads exclusively dedicated to closing files.

There's a good talk on this at https://www.youtube.com/watch?v=qbKGw8MQ0i8

replies(1): >>42821414 #
43. Defletter ◴[] No.42820578{6}[source]
Is it? Because open source tools re-licensing themselves to be more permissive would seem to indicate whose loss it really is.
replies(2): >>42820844 #>>42823838 #
44. usr1106 ◴[] No.42820650[source]
Hmm, my naive summary of AGPL is "If you run AGPL code in your web backend you are obliged to offer the backend source to everyone using a web client". No wonder it's explicitly forbidden at Google.

What does that mean for a linker? If you ship a binary linked with an AGPL linker you need to offer the source of the linker? Or of the program being linked?

replies(2): >>42820662 #>>42840311 #
45. nicoburns ◴[] No.42820662{3}[source]
In practice I think it's pretty much equivalent to the GPL for a linker. But I can understand why people in commercial settings are wary of this license.
46. mistercheph ◴[] No.42820844{7}[source]
Embrace, extend, extinguish. it could take about a century, but every software company (hardware maybe next century) is in the process of being swallowed by free software. Thats not to say people can’t carve out a niche and have balling corporate retreats for a while.. until the sleeping giant wakes up and rolls over you.
replies(2): >>42823007 #>>42861966 #
47. zik ◴[] No.42820853{3}[source]
The way precompiled headers work in C++ is a bit of an ugly hack. And worse, it's almost as slow as just compiling them all every time anyway.
replies(1): >>42820927 #
48. pjmlp ◴[] No.42820927{4}[source]
Only in traditional UNIX, which I mentioned.

Borland and Microsoft compilers have been dealing with them just fine since at very least 1994, when I started using Turbo C++ 3.1 for Windows.

49. CaptainOfCoit ◴[] No.42821244{6}[source]
Even if they wanted to move to another license (which they don't), they wouldn't be able to do. So sounds exactly like they're "stuck", regardless of what they want.
50. leeoniya ◴[] No.42821414{6}[source]
might have been a problem in Bun that was fixed by: https://github.com/oven-sh/bun/pull/16747
51. wyldfire ◴[] No.42821477{4}[source]
They do if they're AGPL licensed and the internal form software is used to provide a user facing service.
replies(1): >>42838250 #
52. cies ◴[] No.42821513[source]
iirc the mold author wanted to make money off of it (and I dont blame him).

AGPL is avoided like the plague by big corps: same big corps are known for having money to pay for licenses and sometimes (yes, I look at you Amazon) being good at deriving value from FLOSS without giving back.

iirc AGPL was used so everyone can just use it, big biz is still compelled to buy a license. this has been done before and can be seen as one of the strategies to make money off FLOSS.

replies(1): >>42823430 #
53. p_ing ◴[] No.42821567{6}[source]
It helps. Install your games on it, too.
54. p_ing ◴[] No.42822889{4}[source]
NTFS and ReFS are high performance file systems. But yes, it is due to file system filters, which OOTB means Windows Defender, though that can be extended by 3rd parties, including Sysinternals utils such as procmon.

Microsoft built a very extensible I/O stack and prior to Defender/prior to SSDs it really wasn't very noticable... back when it was originally designed well through the 90s and early 00s.

Unfortunately it is now noticable despite being an otherwise smart design. Which means Windows and/or NTFS are blamed as being slow, neither of which has any basis in fact when we look at the overall design of Windows' subsystems/VMM in comparison to macOS/Linux.

It sucks. You've got great plumbing in Windows with a shit shell on top.

replies(1): >>42825740 #
55. Defletter ◴[] No.42823007{8}[source]
You've just made a pretty outrageous claim without evidence that would require a lot of effort on my part to refute, so I'll just go with: if you say so.
56. dspearson ◴[] No.42823430{3}[source]
Under what circumstances would commercial companies be required to buy a license?! If they provide Linking as a Service?
replies(1): >>42823710 #
57. IshKebab ◴[] No.42823665{3}[source]
> you're development process requires LTO you may be holding it wrong....

Not necessarily. LTO does a very good job of dead code elimination which is sometimes necessary to fit code in microcontroller memory.

58. cies ◴[] No.42823710{4}[source]
They probably wont NEED a license, but --as said-- big corps dont touch AGPL with a ten foot pole because legal. So it's just to shut up legal, most likely.
59. michaelmrose ◴[] No.42823838{7}[source]
This might indicate moreso that they believe they won't lose anything by the transition and users might ultimately benefit
60. bialpio ◴[] No.42824459{4}[source]
How is the problem of "you signed a CLA without authorization by your employer to do so" solved? I'm mostly asking because I saw the following:

"I will not expose people taping out Hazard3 to the possibility of your employer chasing you for your contribution by harassing them legally. A contribution agreement does not solve this, because you may sign it without the legal capability to do so (...)"

https://github.com/Wren6991/Hazard3/blob/stable/Contributing... (this is I believe the repo with design for riscv cores running on RPi Pico 2)

61. prmoustache ◴[] No.42824486{4}[source]
These are the ones I refuse to contribute to.
62. josephg ◴[] No.42824951{3}[source]
> Yeah, if you're development process requires LTO you may be holding it wrong....

I spent a few months doing performance optimisation work. We wanted to see how much performance we could wring out of an algorithm & associated data structures. Each day I’d try and brainstorm new optimisations, implement them, and then A/B test the change to see how it actually affected performance. To get reliable tests, all benchmarks were run in release mode (with all optimisations - including LTO - turned on).

63. rerdavies ◴[] No.42825740{5}[source]
Disabling Defender on directories involved in compiling and linking speeds up compile and link times by a factor of 5x or 6x. It's not a subtle difference.

I agonize over the insanity of removing Defender protection on precisely the files that are most vulnerable on my computer each time I do it. But I do it anyway.

Interestingly, Android Studio offers to turn off Defender protection for development directories for you, and does so each time you load a project, if you haven't already done so. So I no longer feel like I'm alone in my insanity.

64. rerdavies ◴[] No.42825830{4}[source]
I'm wondering if you've ever actually asked a real corporate lawyer for an opinion on anything relating to GPL licenses. The results are pretty consistent. I've made the trip on three occasions, and the response each time was: "this was not drafted by a lawyer, it's virtually ininterpretable, and it is wildly unpredictable what the consequences of using this software are."
replies(2): >>42837517 #>>42838262 #
65. saagarjha ◴[] No.42837517{5}[source]
Why do some companies engage with it then?
66. amszmidt ◴[] No.42838250{5}[source]
But then it isn’t “internal”…
replies(1): >>42861990 #
67. amszmidt ◴[] No.42838262{5}[source]
Eh, all the GNU family of licenses were drafted by lawyers.

Just using any Copyleft software has no legal consequences (copyleft licenses kick in when distributing, not using them).

68. account42 ◴[] No.42840311{3}[source]
Instead of spreading FUD you could go read the AGPL.
69. account42 ◴[] No.42840365[source]
You should be using LTO where incremental build times are a concern, i.e. for development builds.

And for realease builds link time is hardly a concern.

70. zelcon ◴[] No.42861966{8}[source]
Free software basically only exists because it’s subsidized by nonfree software. It also has no original ideas. Every piece of good free software is just a copy of something proprietary or some internal tool.
replies(1): >>42997919 #
71. zelcon ◴[] No.42861990{6}[source]
It’s too hard to determine what pieces of your stack interact with public-facing services, particularly in a monorepo with thousands of developers. The effort involved and the legal risk if you get it wrong makes it an easy nope. Just ban AGPL.
replies(1): >>42916626 #
72. amszmidt ◴[] No.42916626{7}[source]
The effort involved, and legal risk is exactly the same as for any Copyleft license. If you don't know what your stack is doing, that is the problem -- not the license.
73. Defletter ◴[] No.42997919{9}[source]
Do you have any kind of source for such claims?