Cache or cores? Biscuit or cake?
It's about three years since I built my Ryzen system. It's a Ryzen 5 3600 (Zen 2, Socket AM4) with 32GB RAM.
Since dual core became a thing I have been meaning to take over the world with cunning multi-threaded code but about as far as I've got is some shell scripts that do things in parallel.
I figured I should upgrade the machine while AM4 CPUs are still available. I noted that AMD had some CPUs out with this newfangled 3D cache, and that they were pretty fast on certain workloads.
So my decision was biscuit or cake? Cache or cores?
It's taken me a few weeks, and much deliberation but today I decided to go for the cake. I think it will be more fun to have more cores to play with. I have ordered a Ryzen 9 5900X (12 core/24 thread Zen 3) and a cooler with two great big fans and fancy quiet bearings to go with it.
I'll need to revisit my old tests from three years ago and see what sort of a difference all those extra cores make. Obviously, there will be more contention for memory bandwidth. If I get around to it, I might post the results together with the results for the old CPU.
Meantime, I have been writing a little bit of C, finally getting around to something I've been meaning to do for 15 years. One day I'll write something about procrastination. I have an anecdote.
(Score: 2) by DannyB on Thursday May 25, @08:37PM (1 child)
The JIT is able to do other optimizations that an ahead-of-time compiler cannot do. The JIT has the ENTIRE program, unlike an ahead of time compiler. (But with ahead of time compilers, the LINKER does have the "entire" program, so in theory...)
The JIT can take "liberties" with calling conventions. After all, it has the entire program. The JIT aggressively inlines code. This costs more memory but improves speed. You can always buy more memory, but you can't buy back time.
If the JIT can prove that this method call could only ever call this one certain other method, then it can completely skip doing a vtable lookup in the machine code.
The JVM JIT is the product of more than two decades of intensive research. IBM had first opened this up as open source for researchers a long time ago.
Young people won't believe you if you say you used to get Netflix by US Postal Mail.
(Score: 1, Insightful) by Anonymous Coward on Saturday May 27, @05:47AM
That is one reason why research interest in PGO, IPO, and related optimizations are finally being seen outside of JITs. (The other is faster computers being able to do more work in the same amount of time). The benefits you can get can be quite dramatic, so it isn't surprising that people get excited about it when they land in a language implementation they use.
As an aside, whenever someone talks about something on the cutting edge of programming language development and they looked surprised at my reply, "You should check out how the JVM (usually but sometimes it is OTP or .NET) does that," will never cease to amuse me. It is probably because I've been on the other side of that conversation more times than I can count or really want to admit.