Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pron
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
211.
▲
by
pron
5mo ago
> the performance of Java has to be the best-kept secret in the industry Is it, though? It's the first language of choice for a large number, if not most performance-critical applications. > Because you are the only person I'
212.
▲
by
pron
5mo ago
> I’ve done performance-engineering for decades in Java, C++, and C for both data analytics and supercomputing/HPC. Java performs significantly worse than C++ in all cases without exception. I've done similar work (not supercom
213.
▲
by
pron
5mo ago
> LLVM does speculative devirtualization as well these days, though it's not as aggressive as Hotspot. High-performance native code tries to avoid deep dynamic hierarchies anyway, so it's mitigated by cultural practices. Sure,
214.
▲
by
pron
5mo ago
It may well be the case that it's not an apples-to-apples comparison, but as someone with over two decades of experience in both Java and C++, I find it not only unsurprising, but as a case of both Java and Rust doing exactly what they
215.
▲
by
pron
5mo ago
That is why profiling is the only way to good performance. It's what lets you know what matters, and it's the only thing that does or can. I've been doing low-level (as well as high level) programming for more than 25 years,
216.
▲
by
pron
5mo ago
> Consider the cost of every field, of every action. This runs counter to most modern software performance principles. Thanks to modern hardware optimisations (cache hierarchy, ILP, branch prediction), modern compiler optimisations (aggr
217.
▲
by
pron
5mo ago
This has absolutely nothing to do with what I said. I wasn't referring to people who think that program performance doesn't matter (although I'm sure there are many of those) but to people working on code that either doesn&#x
218.
▲
by
pron
5mo ago
The RAM difference is primarily because both Native Image (what you call Graal VM) and Go use much simpler and less efficient memory management techniques. HotSpot uses much more RAM by design as there are inefficiencies caused by using to
219.
▲
by
pron
5mo ago
> Some of those Rust advantages are exactly the same things that have been touted as major advantages for Java over C++, like escape analysis and lifetimes. These aren't the biggest advantages. I would say that the biggest ones are
220.
▲
by
pron
5mo ago
Oops, thank you, but I actually meant to link to this one about how Netflix uses it: https://youtu.be/4kEh8hxAP4U . But your link is good, too.
221.
▲
by
pron
5mo ago
I'm saying that most developers aren't writing code where layout is a primary contributor to the program's performance. Even in performance-sensitive applications, only a minority of the team are working on the hot spots. And
222.
▲
by
pron
5mo ago
> Do you have concrete examples of large scale Java programs that are significantly more performant than comparable programs in native languages like C++? Yes. I was working in a place that made large sensor-fusion applications, air-traf
223.
▲
by
pron
5mo ago
> Every object (i.e. not a primitive) has a header that IIRC is 12 bytes. But there is good news in JVM land: this will be reduced to 8 bytes in the next JVM release Since JDK 25 it's already 64 bits with the `-XX:+UseCompactObjectH
224.
▲
by
pron
5mo ago
> The cost of each new field is rarely considered Most developers, in Java and in most other languages, do not consider the cost of every field, but I can tell you that people who need micro-optimisations certainly do care, and in Java&#
225.
▲
by
pron
5mo ago
No. I "complained" that Rust is too similar to C++ (which for some is the attraction, and for others not so much) while Zig isn't.
226.
▲
by
pron
5mo ago
By the time C++ and Java were as old as Rust is today there were thousands of programs that over 1MLOC that had been maintained for at least five years. Rust is a rather old language, yet I doubt there are even hundreds of Rust programs ove
227.
▲
by
pron
5mo ago
I don't think Rust users are relevant here. It primarily comes down to personal preferences, and since Zig and Rust are so different, some will be drawn to Rust and others to Zig. If you really like a language and it suits your needs,
228.
▲
by
pron
5mo ago
Neither has been battle-tested at the relevant scale.
229.
▲
by
pron
5mo ago
There is certainly a huge problem with displacing labour in multiple industries at the same time, but the economic story told here in "three turns" is different. When productivity rises costs drop, but because of competition, almo
230.
▲
by
pron
5mo ago
The situation is worse. Not only do agents have more difficulty under "structural constraints", but structural constraints may need to change, and agents are even worse at that. When designing a system or a component we have ideas
231.
▲
by
pron
5mo ago
> In C, we can have a data race on a single thread and without any writes! You need to distinguish between a UB and a race, and I think that's something that discussions of UB miss. Take any C program and compile it. Then disassembl
232.
▲
by
pron
5mo ago
A website that doesn't give people the relevant context for the data it offers is not a good website, especially when the data cannot be understood without that context and the context is not at all well known. That people may misinter
233.
▲
by
pron
5mo ago
By "workable" I meant something more modest, say, successfully compiling SQLite, something that CCC fails to do unless you stretch the meaning of success (it seems the problem may have to do with register allocation, but I would s
234.
▲
by
pron
5mo ago
> Saying the model failed to write a competitive C compiler makes more sense. Their compiler fails to compile (well, at least link) some C programs altogether, and in other cases it produces code that is 150,000x slower than a real C com
235.
▲
by
pron
5mo ago
No, they do not. Uncommitting pages and freeing objects are different things. Even in malloc/free they are separate. The JDK's GCs do know when some memory region is unused and can choose to return it to the OS, but they still do
236.
▲
by
pron
5mo ago
> I'm pretty confident that I could produce a decent C compiler in a few weeks (or less), if given Opus 4.7 + unlimited tokens + a good test suite. Of course. The point is that a full, detailed spec isn't enough (even in the ra
237.
▲
by
pron
5mo ago
> It was a non-trivial exercise well beyond the majority of software applications That depends on how you count. By number of programs that may well be right, but that's not what matters in terms of impact on the industry, as soft
238.
▲
by
pron
5mo ago
The experiment failed to produce a workable C compiler despite 1. the job not being particularly hard, 2. the available specs and tests are of a completely higher class of quality than almost any software, not to mention the availability of
239.
▲
by
pron
5mo ago
People who independently tried to use it reported that it is very much not workable: - "CCC compiled every single C source file in the Linux 6.9 kernel without a single compiler error (0 errors, 96 warnings). This is genuinely impressi
240.
▲
by
pron
5mo ago
People both underestimate and overestimate what LLMs can do. LLMs have shown very different results when autonomously writing a small program for personal use and autonomously writing production software that needs to be evolved for years.
More ›