• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

execution speed of developed applications

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In furtherance to my previous question, Is Java Slow? I am now fully convinced that Java is not slow compared to what is on ground and considering the Virtual Machine which is the (+) of Java. I ahave another question which appens to be :How fast is the speed of developed applications in Java compared to others like C, Pascal, etc.?

[ changed case of subject -ds ]
[ September 24, 2004: Message edited by: Dirk Schreckmann ]
 
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is Java Slow?


Well, Java is fast enough for what it's ment to be used to.

I ahave another question which appens to be :How fast is the speed of developed applications in Java compared to others like C, Pascal, etc.?


It's faster to develop a system in Java than in C - it's also easier to
test and debug the system. I don't have any statistics on "how fast" it
is to develop a system in Java compared to the dev. time in C - try
to search in ACM's digital library if you have access to it.

/Svend Rost.
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But what it's ment to be used for?
Everything, where it performs well?

Speed depends on so much issues - data source, program design, implementation, jvm, hardware, usage...
A general question isn't answerable.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the Intermediate forum...
 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stefan,

But what it's ment to be used for?
Everything, where it performs well?



If you wan't to build software for, say a space rocket or Embedded
programming then Java probaly
isn't gonna be your choice of language as other (eg. C) are more suited
for the job.

If you wan't to build a system that has to be easy to maintain, extends and
so on then Java will be a good choice. Java isn't super fast, but it's fast
enough.

/Svend Rost
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition to raw speed, consider how long the application has to run. A C++ application that appears to work fine in short sessions may have a hard to find "memory leak" that would cause mysterious crashes if the application runs for weeks.
Consider also suceptability to attack by "buffer overrun" exploits - you don't get those in Java programs.
Bill
 
blacksmith
Posts: 1332
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike Gershman:

A compute-bound C program written with an acute awareness of the generated machine instructions and the target machine architecture will be significantly faster than a Java program, even using a Just-In-Time compiling Java Virtual Machine like HotSpot. For example, addressing in bytecode is indirect, requiring a few extra cycles per reference.

For modern general purpose processors, I question whether this is true any more. Microoptimization of the machine instructions is no longer as important as avoiding pipeline stalls, for example, which JIT compilers should be good at. JIT compilers should also be able to avoid indirect addressing, though in fact modern general purpose processors have indirect addressing modes that are as fast as the direct addressing modes.

To put it another way, the programmer might have to be able to correctly anticipate which derivatives will be hot to produce a more efficient pricing algorithm in C than Java ... and if he can anticipate that, he could make a lot more money doing something other than programming!
 
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A compute-bound C program written with an acute awareness of the generated machine instructions and the target machine architecture will be significantly faster than a Java program, even using a Just-In-Time compiling Java Virtual Machine like HotSpot. For example, addressing in bytecode is indirect, requiring a few extra cycles per reference.

However, very few applications involve long periods of compute-bound processing. Those that do can be improved far more by picking the best algorithm than by picking the fastest language.

So if you're rewriting BIOS or pricing complex derivatives, you can do better than Java. Because of the great power of modern CPU's and the complexity of today's applications, there are fewer cases where raw compute speed is the dominant issue in language choice.
 
eat bricks! HA! And here's another one! And a tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic