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

Is java a frontend or a middleware technology or both?
It's a programming language which is used to write application programs and is independent of platform.
Neha
0 0
5

Sir how is Java a pure object oriented programming language?

 

Java is not a purely object-oriented programming language. Lots of people say’s its object-oriented language but it is not true because Java supports primitive data type and does not handle multiple inheritances.
Ram
What are the requirements of learning Java? How long it takes to learn java and what is the fee structure?
Core java is main to learn, if you join my classes it takes one month to become master.
Ruuchi
Can you tell me some new features in JavaFX 2.0?
JavaFX is a software platform for creating and delivering desktop applications, as well as rich internet applications (RIAs) that can run across a wide variety of devices. JavaFX is intended to replace...
Renuka
0 0
5
What is the use of package in JAVA?
Have you ever observed why we all are having kitchen / hall / bedroom or any? Have you ever observed why most of the bags contains zips and folders ? Have you ever observed why people create different...
Pushpendra

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

Ask a Question

Related Lessons

Introduction to Course Content
Video about what we are going to learn throughout the Java Training Session .

Class, Object and Methods in JAVA
Lesson-1: Class, Object and Methods of Java can be compared with body, heart and brain. Without these 3 things, Java does not exist. If you Google the above 3 items, you will find many definitions. But...

How to create Rest web services in Java
Web services are web application components that lets two different applications to communicate over the network.Let if an application which in written java provides web services can be communicated through...

GIT
In software engineering, software configuration management (SCM) is the task of tracking and controlling changes in the software, part of the larger cross-disciplinary field of configuration management....
R

Java 8 Predicates
In the previous lession, we have learnt how to use filters and collectors. In filter we have passed the condition to evaluate whether the object is eligible to be filtered or not. Code given below for...

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