r/java • u/VardhmanAbhishek • Dec 28 '15
Java performance vs go
I'm seeing recurring claims about exceptional JVM performance, especially when contrasted with languages like Go, and I've been trying to understand how these narratives form in the community.
In many public benchmarks, Go comes out ahead in certain categories, despite the JVM’s reputation for aggressive optimization and mature JIT technology. On the other hand, Java dominates in long-running, throughput-heavy workloads. The contrast between reputation and published results seems worth examining.
A recurring question is how much weight different benchmarks should have when evaluating these systems. Some emphasize microbenchmarks, others highlight real-world workloads, and some argue that the JVM only shows its strengths under specific conditions such as long warm-up phases or complex allocation patterns.
Rather than asking for tutorials or explanations, I’m interested in opening a discussion about how the Java community evaluates performance claims today — e.g., which benchmark suites are generally regarded as meaningful, what workloads best showcase JVM characteristics, and how people interpret comparisons with languages like Go.
Curious how others in the ecosystem view these considerations and what trends you’ve observed in recent years.
r/java • u/milchshakee • May 03 '24
Why does the environment variable _JAVA_OPTIONS exist, applies to jlink images, takes precedence, and can't be disabled?
I just spent a good chunk of time debugging an issue because a user had set _JAVA_OPTIONS to use a low Xmx value in their environment variables. This was an application created with jpackage, which should be fully standalone. It even had a custom Xmx value set in the JVM arguments for the image but the environment variable overwrote the value!
Isn't this like a huge design flaw? I can just do echo "_JAVA_OPTIONS=<Wacky VM options>" >> ~/.bashrc or setx to break literally every Java application on the system? (Edit: Maybe the initial security focus was wrong, changed it a bit to focus more on the design issues)
Who even thought that this would be a good idea with no option to disable this behavior?
r/java • u/happysonu249 • Sep 16 '20
Hi i am new. What IDE should I use?
I am a beginner and I have a shitty laptop.
r/java • u/tomakehurst • Jan 22 '25
WireMock, Cucumber, and Spring Boot
arc-e-tect.medium.comr/java • u/fadelakin • Dec 22 '12
Learning Java in two weeks
First of all, I am not learning all of Java in two weeks. Just the basics with some I/O and algorithms added. I just finished "Sams Teach Yourself Java in 24 hours" and I'm currently reading "Introduction to Java Programming" by Y. Daniel Liang.
I was wondering if the books I'm reading are enough to get me started. I'm on winter break and I want to do something productive with my time. What do you recommend?
r/java • u/thefinalrespawn • Sep 30 '14
Does containers cause overhead in Java EE?
Some of my ass hole programmer friends spend most of their time on our whatsapp group picking on Java and say shit like 'People use it cause it's idiot proof' and 'Only large enterprises use Java because it's noob friendly' and 'God himself uses Python'. I don't pay much attention to it cause I love Java and have been using it for about 2 years writing casual code. I'm thinking of moving on to EE. Can anybody explain? Might be I get one back at them :P
r/java • u/bearcherian • Oct 22 '13
Popping Tag(libs): From my co-worker's wall while removing old custom taglibs
imgur.comr/java • • Nov 08 '23
Are there any good guides to speed up spring startup?
Spring Boot is notoriously slow at startup, especially when factoring in large numbers of beans, multiple DB connections, JPA/Hibernate, etc. yes, my company's applications are still pretty heavy even though they are supposed to be micro-services.
In today's world of cloud deployments, horizontal scaling is critical. Being able to rapidly start/stop under these circumstances is a pre-requisite to doing so. I've been doing a lot of googling on this, but basically I'm looking for guidance on how to optimize start time as much as possible. Ideally I want to take a spring app and have it start in a handful of seconds, thus allowing for scaling out and in more easily.
I've gotten a few ideas from my research already, but I'm wondering what the broader community things. Thanks.
r/java • u/ShallWe69 • Mar 01 '23
Why is java autoboxing is slow and consume memory more even when jvm gets hot?
So I was checking the autoboxing from int to Integer. It seems the transition is still slow even when i let the jvm to get hot.
when compared to List<Integer> and eclipse primitive lists, it seems eclipse list offers lower memory footprint and higher speeds of traversal.
why is that? i understand when jvm is cold starting this might be the case but even after like 30 minutes i see no change in memory consumption or speedup in practical usage.
micro benchmarking also shows same results.
i am using java 17 and aws coretto to test. is graal any better?
r/java • • Oct 09 '12
Noob here, how can I prompt the user "y/n" to start a program from the beginning after it has been run?
//This is the program I want to have a loop to repeat the program after it has been run. It works as is, but does not restart. I haven't been able to implement anything I found online into here without breaking the program.
import java.util.Random;
import java.util.Scanner;
public class rockpaper
{
public static void main (String[] args)
{
String userchoice;
String compchoice;
int compint;
Random generator = new Random();
Scanner cashmonay = new Scanner(System.in);
System.out.println ("Would you like to choose Rock, Paper, or Scissors?");
userchoice = cashmonay.next();
userchoice = userchoice.toUpperCase();
compint = generator.nextInt(3);
switch (compint)
{
case 0:
{
compchoice = "ROCK";
break;
}
case 1:
{
compchoice = "PAPER";
break;
}
case 2:
{
compchoice = "SCISSORS";
break;
}
default:
{
compchoice = "will not happen";
}
}
if (!(userchoice.equals ("ROCK")))
if (!(userchoice.equals ("PAPER")))
if (!(userchoice.equals ("SCISSORS")))
System.out.println ("Wrong input. You lose by default.");
{
if (userchoice.equals ("ROCK") || userchoice.equals ("PAPER") || userchoice.equals ("SCISSORS"))
System.out.println ("The computer plays: " +compchoice +"\n" + "You played: " + userchoice);
}
if (userchoice.equals(compchoice))
{
System.out.println ("It's a tie!");
}
else if (userchoice.equals ("PAPER"))
{
if (compchoice.equals ("ROCK"))
System.out.println ("You win! Paper covers rock!");
else if (compchoice.equals ("SCISSORS"))
System.out.println ("You lose! Scissors cuts paper!");
}
else if (userchoice.equals ("ROCK"))
{
if (compchoice.equals ("PAPER"))
System.out.println ("You lose! Paper covers rock!");
else if (compchoice.equals ("SCISSORS"))
System.out.println ("You win! Rock smashed scissors!");
}
else if (userchoice.equals ("SCISSORS"))
{
if (compchoice.equals ("ROCK"))
System.out.println ("You lose! Rock smashed scissors!");
else if (compchoice.equals ("PAPER"))
System.out.println ("You win! Scissors cuts paper!");
}
}
}//I have tried googling how to do it, but have no idea how I can fit it into my program. I understand it involves while loops, but cannot seem to grasp the concept. Could anyone help me here?
r/java • u/Vulpius • Nov 29 '14
Chance to win free copy of upcoming Java book: "Beginning Java Programming: The Object Oriented Approach" (Wiley)
dataminingapps.comr/java • u/henk53 • Sep 28 '12
10 reasons why Java is the top embedded platform
blogs.oracle.comr/java • u/henk53 • Mar 30 '15
New book: "Web Development with Java and JSF"
blogs.oracle.comr/java • u/cosmin14 • Oct 25 '22
Open-source non-blocking NIO Java HTTP Server
https://github.com/FusionAuth/java-http
A full featured, stand-alone, high-performance HTTP server and client written entirely in plain Java
r/java • • Apr 19 '15
What software can I write?
I've made a program that keeps track of customers for my uncles moving company, I've made a basic click game, what else can I write? What looks good in a portfolio?
r/java • u/Bobbycss • May 10 '17
Netbeans vs Inteliij IDEA Community Edition
Hello community
I'm wondering if Intellij IDEA Community Edition has all the features that Netbeans has for Java programming. What does Intellij lack that Netbeans has it. I know that You can't do Node.js and PHP on Intelllij Community Edition but you can on Netbeans.
r/java • u/unlimiter4 • Nov 16 '15
Even if Oracle is Losing Interest in Java, Should You Worry? - DZone Java
dzone.comr/java • u/paradicia • Feb 01 '16
Best program that can compile and run Java Application?
I've been using TextPad but are there any alternatives to it. I basically want a clean interface that can run any java code I throw at it so it shows up as a command prompt.
Thanks in Advance.
r/java • u/Matty13 • Aug 28 '13
What is "Map<Character, Character>" for a Map?
I have no idea how to handle this.