Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I write a simple loop to time a simple operation and HotSpot looks even slower than Java 2 SDK. What am I doing wrong?

0
Posted

I write a simple loop to time a simple operation and HotSpot looks even slower than Java 2 SDK. What am I doing wrong?

0

• I’m trying to time method invocation time. I don’t want there to be any extra work done, so I’m using an empty method. But when I run with HotSpot I get times that are unbelievably fast. • Okay, so I’ll put some random code in the body of the method so it’s not empty and the inlining can’t just remove it. Here’s my new method • I’m trying to benchmark object allocation and garbage collection. So I have harness… • I have a graphics-intensive or GUI-based program. I’ve tried it on HotSpot and it doesn’t seem to perform much better than the Java 2 SDK, and only slightly better than on JDK1.1.x implementations. Why isn’t HotSpot making my graphics code go faster? • What do you recommend for benchmarking HotSpot, or any virtual machine?

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123