UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How many times faster does C++ outperform Java in scientific calculations?

Asked by Last Modified  

2 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Trainer

Usually C/C++ outperform in almost all kinds of processing. All scientific operations and calculations needs high performance. For illustration purpose I tested simple program which prints from 1 to 10 million using C, C++ and JAVA. C++ program takes on an average of 33 sec, JAVA takes on average of...
read more
Usually C/C++ outperform in almost all kinds of processing. All scientific operations and calculations needs high performance. For illustration purpose I tested simple program which prints from 1 to 10 million using C, C++ and JAVA. C++ program takes on an average of 33 sec, JAVA takes on average of 84 sec and C took 26 sec to print on a dual core 2.6 ghz mac. From Benchmark game these are the results for JAVA and C++ (C++ beats in all cases if speed is taken consideration). Java vs C++ g++ (64-bit Ubuntu quad core) But again, you will enjoy the performance of C++ only when it is well written and optimized. If not, you don’t see any difference between it and java. Java is also a beautiful language and it is meant for developing enterprise web applications and it has an inbuilt powerful garbage collection mechanism which C++ lacks and programmers have to take responsibility of destroying the unused objects. read less
Comments

Computer Teacher

JIT vs. Static Compiler As already said in the previous posts, JIT can compile IL/bytecode into native code at runtime. The cost of that was mentionned, but not to its conclusion: JIT has one massive problem is that it can't compile everything: JIT compiling takes time, so the JIT will compile...
read more
JIT vs. Static Compiler As already said in the previous posts, JIT can compile IL/bytecode into native code at runtime. The cost of that was mentionned, but not to its conclusion: JIT has one massive problem is that it can't compile everything: JIT compiling takes time, so the JIT will compile only some parts of the code, whereas a static compiler will produce a full native binary: For some kind of programs, the static compiler will simply easily outperform the JIT. Of course, C# (or Java, or VB) is usually faster to produce viable and robust solution than is C++ (if only because C++ has complex semantics, and C++ standard library, while interesting and powerful, is quite poor when compared with the full scope of the standard library from .NET or Java), so usually, the difference between C++ and .NET or Java JIT won't be visible to most users, and for those binaries that are critical, well, you can still call C++ processing from C# or Java (even if this kind of native calls can be quite costly in themselves)... C++ metaprograming Note that usually, you are comparing C++ runtime code with its equivalent in C# or Java. But C++ has one feature that can outperform Java/C# out of the box, that is template metaprograming: The code processing will be done at compilation time (thus, increasing vastly compilation time), resulting into zero (or almost zero) runtime. read less
Comments

Related Questions

how to run a java program
go to command prompt then write the following-- For compilation: javac filename.java then press enter For run: java classname then press enter
Prem Kumar Pathak
What is JavaBean?
All javabeans are pojos ,But not all pojos are not javabeans.
Ankit
0 0
6
why can't we create an object for abstract class? why wait,notify,notifyall methods were in object class but not in thread class?
Abstract class is having an abstract method. It is empty method, created for future requirements, therefore usage is not certain by specifying objects to it.
Jilani
Where advanced java can be utilized?
Advanced Java is an extension of Java used for developing and running enterprise software and large-scale multi-tiered, scalable, reliable and secure network applications.
Nish

 I want to learn from beginning, please tell me what is the best source to learn (core java)

hi sunaini It is very good that you want to learn programming... I would recommend you c,c++,java and dotnet courses...for becoming a good provrammer.. we provide online training..at lowest prices if...
Sunaini

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

What Would Be Life Cycle Of A Fresher After Campus In An IT Company?
1. Basic Technical Training: Since freshers are not subject matter experts so gone through 3 - 6 months basic technical training within Organization. 2. Technical Assessment: HR sends freshers to various...

Java : Compile-time Versus Runtime optimization
While designing and development, one should think in terms of compile-time and run-time.It helps in understanding language basics in a better way.Let's understand this with a question below : What...
S

Fractional Knapsack
Algorithm - Fractional Knapsack import java.util.Scanner; public class Knapsack01 { public static void main(String args) { Scanner scan = new Scanner(System.in); int...

Comparable vs Comparator
java.lang.Comparable java.util.Comparator For comparing some other object with its own object. Ex. I am comparing myself to some other employee. Method signature is: int compareTo (T object). For...

How can everyone prepare to clear any Java interview?
Java interview your java should be much strong then J2EE. core java and Advance java is the basic foundation for Interview. Some of the topic about which you should know before going for a java interview...

Recommended Articles

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more