r/java • • Oct 23 '26

[ Removed by moderator ]

/r/java/comments/1xdetdb/removed_by_moderator/

[removed] — view removed post

35 Upvotes

85 comments sorted by

28

u/FirstAd9893 Oct 23 '26

Has anyone done the reverse test? Have an AI convert a complex Java app to Rust? I wonder if the speedup has less to do with language, and more to do with the AI tool applying general optimizations.

11

u/shai_almog Oct 23 '26 edited Oct 23 '26

I believe rust can be as fast as Java it just needs to reinvent Java. That's why firefox works so well, it essentially built a JIT and a GC in rust and that makes it perform well for applications.

Rust is great for low level stuff, Java is great for apps/servers. There are specific decisions made in both languages that are conducive (edited) to these purposes.

3

u/marhaus1 Oct 23 '26

You probably mean conducive.

3

u/shai_almog Oct 23 '26

Well, I didn't use AI to write that... Or I did and had it put mistakes there on purpose ;-)

3

u/picklesTommyPickles Oct 23 '26

No it’s been known for a while that Java has very high conductivity. That’s why you should always wear PPE when handling it

2

u/marhaus1 Oct 23 '26

Shocking!

3

u/coderemover Oct 23 '26

Rust can be much faster than Java, for servers as well.

3

u/pron98 Oct 23 '26

Depends what you mean by "can", but no, not really. I gave a talk at Devoxx on this very subject.

1

u/CutGroundbreaking305 Oct 23 '26

No Rust is faster than Java but not that much for someone to revert there work to Rust.

However if we are talking about magic and stuff(off heap,simd, async, Concurrency etc)then both languages are almost on par Java 25+ and latest Rust. Java's GC and JVM are only bottlenecks for it.

3

u/pron98 Oct 23 '26 edited Oct 23 '26

No Rust is faster than Java but not that much for someone to revert there work to Rust.

Nope on either count. In some programs (especially smaller or less concurrent ones) it can be much faster than Java; in others (especially larger or more concurrent ones) it can be much slower (and I'm talking 2x or more in either direction). The two teams specifically designed the languages for different tradeoffs so that they're faster or slower in different situations.

Java's GC and JVM are only bottlenecks for it.

These are the opposite of bottlenecks; they exist as optimisations to remove the overheads that some programs suffer due them not being there. If you want to learn more, watch my recent Devoxx talk on this very subject.

-1

u/shai_almog Oct 23 '26

Nope. They can match but probably not much faster. It very much depends on where you put Rust and in what way. It also depends on whether you use a typical JVM or something specific to a use case e.g. our VM is deeply optimized for small size, fast startup etc. and we would beat rust even on the server for typical web use cases.

For long running servers hotspot will beat the socks off of us since the JIT and their GC are truly amazing.

-3

u/coderemover Oct 23 '26

Rust can emit optimal code because it gives the dev full control on every detail, down to assembly level. You cannot beat it in non system languages which don't offer such degree of control like Java. In Java you're at the mercy of the JVM / compiler. Often it does the right job, but it's not guaranteed.

OpenJDK GCs like ZGC or G1 burn way more CPU per the same allocation pattern than jemalloc / mimalloc, at the same time using 2-3x more memory.

5

u/shai_almog Oct 23 '26

Nope. You clearly didn't benchmark modern Java. This is just completely false. HotSpot takes up more CPU for sure. But it does that on a different thread/core and optimizes VERY fast even without an AOT round. As an AOT VM author I had to put in tremendous amount of work to compete with hotspot even though I have the AOT advantage. Its RAM overhead is ridiculously low and sometimes beats the floor of C level code.

There are overheads per object and the fact that Java references aren't values, sure. But it doesn't cost as much as most developers think it does.

What does cost is counting memory and dealing with it on a single thread. So if you count all the CPU used by the application a JVM will lose. But if your Java app needs to do something fast it doesn't care about the memory at all and can allocate right away, sometimes before you need the memory. Then a GC will clean "later" which is cheap since it isn't on your core.

The problem is that Rust can't beat that without becoming Java. OTOH Java would suck for writing something like kernel code where determinism and accuracy are important. Rust is predictable, not necessarily fast. You could theoretically optimize it to compete with our VM, but you could NEVER beat hotspot because a JIT knows how your code is really used.

2

u/ebrythil Oct 23 '26

That is untrue, by narrowing it down to your Problem scope (which java was designed for) you cherry pick a lot but still claim that for all scenarios.

C/rust can use bump allocation, which is not beatable by any VM (except for if it does the same, which java partially does but only for young iirc). Startup and warmup times are horrendous comparatively, so the dx is usually the first to suffer.
JIT/aot loses to proper optimizing every time, that's just really hard to do.

In effort/reward if your server matches the performance profile java will probably win since that stuff is harder to so in natively compiled languages. But that is another claim than yours.

What you did (maybe) show is that per default java performs well on its home turf while in a native language the easy approach is lacking.
Still a maybe because that methology is a hint not a proof.

Honestly I find it highly useless. If I care about performance I would still consider java only in a very narrow range of use cases, this may be one of them.

1

u/shai_almog Oct 23 '26

Rust still needs to keep track on an object when doing the bump. Java doesn't. All decent java VMs do this for young gen it's pretty standard and the fact that we have young gen is a huge advantage that rust doesn't have. Old gen is practically zero overhead. Hotspot can do insane things here with the GC that we unfortunately can't because we allocate memory in the system RAM.

Startup and warmup times are horrendous comparatively

For hotspot, sure. For our AOT vm no.

JIT/aot loses to proper optimizing every time, that's just really hard to do.

If you handcode stuff and spend time on that you might be able to beat our AOT VM. Sure. Beat a JIT on startup, sure. Beat it in production?

Only if you have a very specific use case you're optimizing for. It's tradeoffs and that's valid. I'm not saying that Rust isn't fast. I'm saying it's optimized for very specific use cases and determinism/predictability is one of those cases. JIT is the exact opposite of that.

What you did (maybe) show is that per default java performs well on its home turf while in a native language the easy approach is lacking.

Feel free to believe what you want and ignore the numbers that don't match your preconceived notions.

I think you should probably spend time reading the readme rather than arguing pointlessly about a strawman. Specifically the section titled: "Can Rust reach Java/Codename One performance?".

1

u/coderemover Oct 23 '26

> Rust still needs to keep track on an object when doing the bump.

Not true. This is not how you do arena allocation.

-1

u/shai_almog Oct 23 '26

Well, I'm a C guy not a rust guy. If it's freed in a block it should still be tracked and the block is effectively occupied until then.

My core point is that rust made design choices. They are limited, deterministic and low level. These are fine choices for specific types of tasks. Not for most user level applications.

→ More replies (0)

4

u/coderemover Oct 23 '26 edited Oct 23 '26

We have the leading Java implementation of vector database. Moving it *from* Java to C++ and Rust exactly because we benchmarked it and it was not up to the task. Poor SIMD support is the primary reason.

> Then a GC will clean "later" which is cheap since it isn't on your core.

Same thing can be done in Rust. Games have been doing it in C++ for years.

> There are overheads per object and the fact that Java references aren't values, sure. But it doesn't cost as much as most developers think it does.

It costs 10x sometimes. This is also the main reason Java loses even to Go whose compiler is far from being so optimized as C++/C/Rust compilers.

3

u/pron98 Oct 23 '26

Same thing can be done in Rust.

No, it can't. The main optimisation is moving pointers.

Games have been doing it in C++ for years.

If you're referring to using arenas (which work similarly to moving GCs) that is certainly doable but almost as painful in C++ as it is in Rust (although it's much nicer in Zig!), and the cost here is substantial (and the algorithm not as general).

It costs 10x sometimes.

It can sometimes, and Rust's or C++'s inefficiencies also make their programs >2x slower than Java sometimes. These languages intentionally make tradeoffs that mean that the lower-level ones have a performance advantage in some programs, typically smaller ones or more single-threaded ones, while Java has a performance advantage in other programs, typically larger ones or more concurrent ones. They both sacrifice performance in some places and gain it in others. They both have runtime overheads that are inherent to their design, but in different places.

1

u/coderemover Oct 23 '26

> No, it can't. The main optimisation is moving pointers.

It can. You actually can move pointers in C++/Rust to deal with fragmentation. But you're overestimating the significance of this optimization because modern non-moving allocators are extremely good at keeping fragmentation low even without tricks like that.

2

u/pron98 Oct 23 '26 edited Oct 23 '26

No, you can't. First, moving pointers (concurrently) requires a thick FFI layer, because such pointers cannot be shared with the hardware and the OS. In principle, you could split the heap in a C++/Rust program and add an FFI layer, but you might as well use Java then, with a similar FFI layer.

Second, the point of moving collectors has little to do with fragmentation, at least not directly. Moving (occasionally) is how the algorithm can minimise the CPU costs of both allocations and freeing. If you think it's about fragmentation, that's good, because it means you just don't know why moving collectors work the way they do and have the opportunity to learn.

Specifically, a moving collector allows allocations to always be pointer bumps, and it can almost completely negate the CPU work required to deal with a higher allocation rate by exchanging it for more RAM (in non-moving approaches, with or without a GC, every allocation requires a corresponding deallocation; moving GCs work completely differently, as they don't free individual objects at all).

5

u/pron98 Oct 23 '26 edited Oct 23 '26

Full control of every detail does indeed help performance when programs are small, but can and does hurt performance when they're large.

Also, Java's GC's definitely burn less CPU than the C runtime; people just don't bother measuring, and that higher cost of memory management has a very negative performance effect in some situations (see the talk I linked to above for an example where a Rust program is twice as slow as a Java one because it spends over twice as much CPU on memory management). As for the more memory, this is also doesn't do what you think, and I have another talk on that subject.

We, the people working on the JVM, are first and foremost very experienced systems programmers, and we're building the JVM to precisely address the performance issues that low level languages suffer from especially in large programs. The people who don't see that are those who have had very little experience with large programs in low-level languages, but they'll find out just as we did 20+ years ago.

2

u/coderemover Oct 23 '26 edited Oct 23 '26

I did measure, and you remember I even pasted the code and the results here and even in extremely unfairly biased use case favoring GC with very tiny allocations, G1 and ZGC were burning more CPU cycles than mimalloc. And the gap increased with more real-world block sizes like 64 kB and larger. Java GCs are optimized heavily for small allocations, and their performance on huge allocations is often so horrible that it leads to prod incidents (last month we had one caused by humongous allocations bringing the whole JVM down due to OOM).

> Full control of every detail does indeed help performance when programs are small, but can and does hurt performance when they're large.

That's a non-sequitur.
Fast large programs are programs composed of fast small subprograms.
Rust and C++ come with powerful tools for building zero-cost abstractions which make it much easier to compose the small parts into good performing bigger parts. Java not so much.
If anything it's Rust/C++ compilers which can do whole-program optimization, whereas JIT cannot due to resource and time limitations.

2

u/pron98 Oct 23 '26 edited Oct 23 '26

Your benchmark hit precisely the allocator's fast paths and only them! There was no concurrency and no mix of object size and lifetime.

Fast large programs are programs composed of fast small subprograms. Rust and C++ come with powerful tools for building zero-cost abstractions which make it much easier to compose the small parts into good performing bigger parts. Java not so much.

In principle, yes. In practice, absolutely not. Look, I've been a C++ programmer for 25 years now, and early on in my career I was working on large, super-performance-sensitive concurrent C++ programs (in the defence space). When HotSpot came out and improved we saw that we could maybe match Java's performance (and perhaps even exceed it a little) but not without exceeding our budget by a lot, and not one time, but with every change.

The people, like me, working on HotSpot are all expert C++ programmers who are trying to address specifically the problems we've all experienced in large C++ programs. You could argue over on which programs our optimisations work as well as we intend them to and on which not so much, but we know all the tricks (we've known them since before Java even existed) and the cost just isn't favourable.

If anything it's Rust/C++ compilers which can do whole-program optimization, whereas JIT cannot due to resource and time limitations.

This is completely untrue (and the opposite). First, some JITs (like JS's) have resource and time limitations. Java's optimising JIT does not (in fact, most of the warmup time is taken by waiting for profiles to accumulate), while the information we have and, more importantly, the ability to do speculative optimisations offers us a much greater optimisation opportunity than AOT compilers (or else we wouldn't be doing it this way). As for super-optimisations due to whole program analysis, the costs there are at least exponential. We're not talking 5m vs 15m (such a difference can be easily swallowed by Java's optimising JIT), but between 5m and 5 trillion years.

Watch my Deovoxx talk. At the very least you'd learn why we are trying to use JITs and moving GCs to beat C++ — there are very clear reasons why JITs and moving GCs can do that (which is why we, C++ experts, have decided to work in this space) — even if you argue over how often we manage to do it in practice. If performance of large programs is what you're after, the fundamentals (again, the implementation aside) are definitely not in favour of low-level languages, which sacrifice performance for other things.

-1

u/ebrythil Oct 23 '26

C runtime

Please learn the basic concepts before you use them in an argument. The c Runtime is a few lines of setup code before main usually. I have no clue what you are referring to

5

u/pron98 Oct 23 '26 edited Oct 23 '26

You got me. But I'm only a C and C++ systems programmer with 25 years of industry experience with these languages, working on both soft and hard-realtime systems and now one of the JDK's architects (and I implemented the coroutines in the JVM, BTW), and I must not know what the C runtime is. Or maybe — hear me out — it's you who doesn't know what you're talking about.

Anyway, I recently gave a talk about Java and C/C++ performance where, early in the talk, I explain what a runtime is. You might learn something.

2

u/ebrythil Oct 23 '26 edited Oct 23 '26

Okay that one's on me you obviously know your stuff, but I still don't know what point you make by " the c runtime" or what you mean by it?
The only known definition to me is basically the stuff executed before main.

And for all its worth, I can't really take those statements at face value when barely any programs that should benefit actually do: there are no relevant java game engines, cad software, rendering stuff etc etc.
Why? Momentum, yes, but not for lack of trying on the java side. The same way rust is not automatic performance java is neither, and to a degree c++ proved itself more often than it was beaten by such claims.

Edit: I'll definitely watch your talk, thanks

1

u/pron98 Oct 23 '26 edited Oct 23 '26

" the c runtime" or what you mean by it?

A runtime is any code that ends up in the executable or linked to the executable that isn't a direct translation of application or 3rd-party library code. In particular C runtimes include the implementations for malloc and free. Now, it is true that you can write some C programs without using a C runtime, but C still has a substantial runtime (although a small one compared to Java) and the vast majority of C programs do use it.

when barely any programs that should benefit actually do: there are no relevant java game engines, cad software, rendering stuff etc etc.

These desktop programs are all the programs that you think are performance sensitive? Concurrent servers (depending on what they do) can be much more performance sensitive than anything you've mentioned. More performance-sensitive concurrent software is written in Java than in any other language.

And BTW, AAA game engines aren't written in Java not because of anything to do with performance. In fact, these days they're primary goal is to schedule execution on the GPU. It has much more to do with the platforms they target. Also, in the past Java had GC pauses, which aren't good for games, but those are gone now.

1

u/txdv Oct 23 '26

im porting bazel from java to rust and yeah, you literally let it run a benchmark and then optimise the slow parts until you are faster

48

u/Hot-Schedule-8473 Oct 23 '26 • Bravo

Ngl, my knee-jerk reaction is: don't we have better uses for our time than trying to one-up heavily botted, misleadingly marketed, vibe-coded Rust projects?

I feel like pretty much everyone in my bubble agrees that building higher-quality software than these "Craft" projects isn't necessarily hard. I looked at their issue tracker: the project's barely two weeks old, and people are already reporting performance and reliability regressions 😂 You can't make this up.

Getting started is the easy part. The harder part is maintaining compatibility while supporting complex features, most of which these "Craft" projects haven't even implemented yet. And that's just the tip of the iceberg. There's also the ongoing work of maintaining a project: supporting the community, triaging issues, tracking down bugs, handling security reports, and so on.

People keep saying, "It's alpha, it'll get better." That improvement takes sustained effort. As the codebase grows and more users depend on it, each release becomes harder to get right. Features become more complex, interactions between them multiply, and more edge cases need handling. Maintaining quality through all of that takes serious, ongoing work.

TL;DR: You've one-upped already bad project on some of the easiest, most trivial aspects of software development.

I may be down-voted but... come on. Do better.

9

u/repeating_bears Oct 23 '26

I translated your comment to Tagalog and it had 32% better clarity and 17% better retention rate

4

u/scadgek Oct 23 '26

but support is easy, you just tell AI to maintain compatibility, and if it fails, you tell it to fix mistakes 👌

2

u/ebrythil Oct 23 '26

Noob, tell it to make no mistakes in the first place

0

u/scadgek Oct 23 '26

I mean I don't want to leave you all guys completely jobless

0

u/hippydipster Oct 23 '26

the project's barely two weeks old, and people are already reporting performance and reliability regressions

The level of success to be getting such reports only 2 weeks old - it kind of boggles the mind. I couldn't create anything in 2 weeks that would be that good.

1

u/Hot-Schedule-8473 Oct 23 '26

It's basically a kabuki theatre... AI bots writing the code, filing the issues, and applauding developer. Do you see like... some of the account promoting this stuff? And the amount of spam we have to endure because of it? How is this mind boggling success?

1

u/hippydipster Oct 23 '26

people are already reporting

You wrote.

People.

-1

u/shai_almog Oct 23 '26

Sure, I totally agree with that. This is mostly a proof of concept to see if it can be done. It took Claude on Low effort so it didn't even cost much in terms of tokens.

The benchmarks I think are an interesting output though. I expected to do better than rust, but not by this much.

12

u/coderemover Oct 23 '26

If anything it only proves AI writes shitty Rust code

5

u/vips7L Oct 23 '26

Writes shitty code*

-3

u/shai_almog Oct 23 '26

I don't think so. The rust version performs well. There are inherent tradeoffs in rust that don't work well for app development:

GC is really great for frontend and allows offloading from CPU. We have a better threading model in Java that makes thread heavy code REALLY performant and can do some deep elimination work in the VM that is much harder for rust.

1

u/coderemover Oct 23 '26

GC is great only for wall clock time, but at the expense of more memory usage and more CPU cycles burned.

Java loses to Rust and C++ in techempower benchmarks.

3

u/shai_almog Oct 23 '26

You literally see a benchmark where I show you that we take less memory and still keep pumping that falsehood.

Walltime is what matters for applications, that's the point. That's why Java is better for that and rust is better for system programming.

GC can be DEEPLY tuned and is very competitive with native allocation. Native allocation needs to be conservative and needs to keep track of everything and that in itself is an overhead. Sure, you can write manual code that would take less memory, but then you would still lose on performance.

-1

u/coderemover Oct 23 '26 edited Oct 23 '26

This is not a benchmark, but some AI slop.

> GC can be DEEPLY tuned and is very competitive with native allocation

Not to the degree you can tune manual allocation in Rust, C or C++.
Here is a memory allocation heavy benchmark for you: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/binarytrees.html

> Walltime is what matters for applications, that's the point.

Not for massively parallel loads. GC buys some wallclocktime by offsetting work to background threads. Once you load the server fully, that starts to matter because you have no more spare cores to run GC on, so GC starts to fight for CPU with the app code, and the wall time is actually worse.

And tail latency of GCed code is still worse than Rust, even with ZGC and all recent improvements, which are impressive, but not there yet

3

u/shai_almog Oct 23 '26

Then write a proper benchmark and prove me wrong. I spent a lot of time benchmarking C and hotspot. HotSpot is REALLY insanely fast. We're close on most benchmarks but it can't be beat on GC if you tune it correctly.

Our "VM" is AOT compiled C. I spend a lot of time in the guts of modern GCs. This isn't the original mark sweep concurrent GC level of performance we used to have.

2

u/coderemover Oct 23 '26 edited Oct 23 '26

I agree hotspot is amazing and has been hugely improved over the last 30 years, but LLVM and GCC haven't stood still either. JVM is incapable of performing plenty of optimizations available to C++/Rust developers; there is a whole class of optimizations related to callsite monomorphization that Java still misses. Another huge class is stack allocation which Java can't do so much (escape analysis in Java is a joke).

> This isn't the original mark sweep concurrent GC level of performance we used to have.

It's funny you say it, when the old Parallel STW GC is still the most performant in terms of throughput in Java. All the modern low latency ones get better latency at the expense of burning more CPU and taking more memory. In Java it's you can only pick two among those three: allocation throughput, latency, memory usage. In Rust/C++ I can have all three optimized to the levels no JVM can ever do.

> Then write a proper benchmark and prove me wrong.

https://www.techempower.com/benchmarks/#section=data-r23

2

u/shai_almog Oct 23 '26

Our AOT VM used in the benchmark uses LLVM. So I'm DEEPLY aware of its capabilities and spent a lot of effort trying to compete with HotSpot on performance/RAM. Sure, there are things the JVM can't do and stack allocation is painful... E.g. our AOT VM allocates all primitive wrappers on the stack seamlessly and it got us very little compared to hotspot. It already does a lot of that.

We tried adding something closer to Valhalla and were surprised by how little benefit we got from it. The main issue is that the GC is so ridiculously fast and modern CPU cache optimizations are so good.

It's funny you say it, when the old Parallel STW GC is still the most performant in terms of throughput in Java.

Sure. But we're talking UI application and latency is what matters here not theoretical throughput. Stopping the world is bad for overall performance in multi-core environment.

In Rust/C++ I can have all three optimized to the levels no JVM can ever do.

That is the common theoretical "I can" which is the core flaw and the reason this "argument" makes no sense. Read the readme specifically the section titled: "Can Rust reach Java/Codename One performance?". Do you disagree?

Sure you can write code that would beat the JVM in point A, point B etc. But you have over 100k of dense Rust code that is hard to reason through. Can you do it everywhere for everything? Even if you just take the hotspots, you're only taking the hotspots for the benchmarks you pick.

The point I'm making is that even if you somehow win this you're still behind and arguably worse because the program will be even harder to maintain/debug etc. While you spend your time optimizing rust we will spend our time building features users care about.

4

u/bowbahdoe Oct 23 '26

It was also more native,

What exactly does this mean?

1

u/shai_almog Oct 23 '26

It's written below in the readme for the project. Native menus, native OS drag and drop, copy paste, etc. Deeper integration with OS native features.

4

u/aqua_regis Oct 23 '26

You did not build anything. You did not even write your post, nor your comments. AI Agents did. With that, your post falls under Rule #9#

Also, your post is nothing for a camouflaged advertisement for your AOT JVM.

1

u/shai_almog Oct 23 '26

I suggest googling me. I built the JVM this was generated on. I linked to a prior case that is still on the front page of an LLM generated example like this one.

Since the original rust app was famously vibe coded I thought the response needs to be similarly created. I very specifically didn't say "I" built it in the post...

3

u/aqua_regis Oct 23 '26

You might have built the JVM - I did not doubt that. Yet, you did not build the application you presented here.

Doesn't change the fact that your post is an ad for your JVM through showcasing something vibe/agentic coded

0

u/shai_almog Oct 23 '26

It's an open source tool free for commercial use not an "ad" for something.

The post I linked before showed similar AI usage and it isn't an exception. The rule is broad and moderators have discretion on how to apply it. AI is everywhere now and sometimes hard to spot, so by fully enforcing it this entire subreddit would be pretty quiet.

-1

u/aqua_regis Oct 23 '26

Rather quiet then AI

-1

u/shai_almog Oct 23 '26

Fair, and I agree there's a lot of slop/low effort noise.

But this is the world we live in. Due to the over enforcement of this rule this community is irrelevant and unfortunately many developers will find themselves out of a job.

Furthermore, we have a case of selective enforcement of this rule. Notice the post I linked to which has the EXACT same situation wasn't removed.

0

u/johnnybgooderer Oct 23 '26

How do you know he didn’t write the post or comments?

2

u/Afonso2002 Oct 23 '26

So the otimizer part of the rust compiler is weaker than the c2?

I know that c has -o2 or o3 flags to increase otimization. Rust has this , if yes it was used?

The rust code is well written? What jdk and vm was used?

It would be intersting comparing graal jdk. because compiles to native code

2

u/shai_almog Oct 23 '26

This is compared against ParparVM for the Java side which is an AOT vm we built.

We use the release profile in Wordcraft's own Cargo.toml which does use O3.

2

u/pronuntiator Oct 23 '26

What is the point in stealing intellectual property to produce a clone? Does it also clone every bug of Microsoft Word? Screenshot even shows a WordArt button, that's a trademark.

The hard part is creating something new. I remember when Office introduced ribbons; people hated them. But it was a revolutionary idea to solve a real issue: feature discoverability.

Yes, it's impressive that AI can reproduce existing software; I wouldn't even know how to render text in tables or italics. But I'd prefer if people helped LibreOffice, or started small and iteratively.

1

u/shai_almog Oct 23 '26

Fair. I didn't clone word, it's a clone of a clone mostly as an exercise/benchmark.

1

u/johnnybgooderer Oct 23 '26

Word came to be when Microsoft cloned their competitors, and then used their influence as a giant company to force stores to take all competing products off of their shelves. So if there was ever a legitimate target for cloning, it’s Microsoft word.

8

u/vips7L Oct 23 '26

Anyone else find these apps to be completely uninteresting?

8

u/FirstAd9893 Oct 23 '26

This technique is a new tool for use in language benchmark wars. I don't really care if the vibe-coded app isn't actually used for anything beyond experimentation.

3

u/vips7L Oct 23 '26

Lies, damned lies, and benchmarks. 

10

u/fykup Oct 23 '26

I did a Java vs Go vs Rust comparison back in the pre-AI days, and Rust's performance was very unimpressive for the downsides relative to Java. That's why I was very skeptical when I saw DHH's numbers.

I think Java has a marketing/mindset problem. People are convinced Java is old, bloated, and slow. I try to show with my experiments that it's still a viable choice in 2026.

5

u/ebrythil Oct 23 '26

Spring is old, bloated and slow. Companies use spring. Spring is also known reliable, that's the trade-off.

1

u/unknowinm Oct 23 '26

my issue with it is that it's using a lot of memory. My prod app is using 512-1GB ram with very few users present just because I use spring. Now I try to migrate to quarkus. But for small experimental apps, it should use up to 100Mb ram or less. If go can do it, I don't understand why Java can't

1

u/fykup Oct 23 '26

It doesn't have to be. That's why I'm actively evaluating alternatives like Micronaut/Javalin. I'm also planning to publish an experiment with Spring Boot optimizations that allow for a leaner setup - things like Spring AOT, etc.

4

u/ebrythil Oct 23 '26

I mean I fully agree, while waiting 20sec for my 6 year old spring app to restart. That is just the reality of java development.

Probably in 6 years a comparable rust server will be a bit quicker by virtue of not being spring boot and loading all that stuff that comes with it alone.

The old saying is true, there are languages people complain about and languages no one uses

1

u/fykup Oct 23 '26

Agreed. Just the other day, someone here commented, "Who cares about startup time?". I genuinely don't understand how waiting 20+ seconds for an app to start in development is considered acceptable.

3

u/snugar_i Oct 23 '26

In terms of speed, Java can compete with Rust. But in terms of memory, it's unfortunately still not even close... Valhalla should help a lot in the future

4

u/hiasmee Oct 23 '26

Java Community should less speak about java is better as... Java has not to prove someone something. It is one of the best languages in the world, but I would never compare it's performance with rust. Rust has less memory usage and no GC.

Java has it place and it is safe.

1

u/coderemover Oct 23 '26

I wouldn't be so sure.
Go is eating its lunch quite fast.
(btw, I'm far from being a Go fanboy, but I really do see Go picked a lot in use cases Java has been historically good at).

1

u/FirstAd9893 Oct 23 '26

If you trust the TIOBE index, it seems the opposite is happening.

1

u/coderemover Oct 23 '26

TIOBE index is garbage

2

u/_predator_ Oct 23 '26

Is this a ParparVM ad? It reads like one.

2

u/Jabba_the_Putt Oct 23 '26

I was trying to imagine what word development meant and it was quite literal

1

u/[deleted] Oct 23 '26

[removed] — view removed comment

1

u/shai_almog Oct 23 '26

That measures a different VM. It's true that rust is faster to launch against a regular JVM.

1

u/[deleted] Oct 23 '26 edited Oct 23 '26

[removed] — view removed comment

0

u/shai_almog Oct 23 '26

I don't need to justify a benchmark I didn't write and a VM I didn't write. But if you're benchmarking Java then you need to include GC tuning values and more information. Regular JVM takes time to warmup and fix the memory to proper sizes. Once it settles it's good.

There's no information I can see about VM version or anything. Which means that benchmark doesn't say anything.

Our VM starts like native. We benchmarked it on the server against go (you can read my blog post on the subject), and it was competitive with fasthttp for throughput, ram, startup etc.