Why is java so slow ?

No, that is not really true.

But this happens when you let frameworks and toolboxes grow unchecked. Java in itself is fast enough to do a lot of things you need done, but if you layer abstraction over abstraction you end up spending a lot of cycles only pushing bits around instead of doing real work. This happens when you have a language and runtime being developed by a comitee.

I for myself like Java (the idea), but I get into fits of rage when I have to use f.e. eclipse or handle the quagmire the project turned into.
 
graudeejs said:
It's supposed to be slow by design :)
Only to some extent. Having the Java VM (JRE) in between the program and the machine as an additional layer is of course always going to make it slower than, say, compiler-optimized Fortran, sure. But having said that, the Diablo JRE isn't supposed to be as slow as the TS complains it is. So I think the main question is: why is Java so slow on the TS' machine?

Fonz
 
sw2wolf said:
It is VERY slow so that i feel it is not practical in freebsd [sic].
Can you provided some details of your system? Java will by design never be the fastest, but it isn't supposed to be VERY slow.

Fonz
 
sw2wolf said:
It is VERY slow so that i feel it is not practical in freebsd.

Slow in what way? Slow to download? Slow to start, to compile, to run an application? What application?
 
They use java vm with jruby to keep twitter up and running. It all depends. The right tool for the right job. If I was going to create a simple filter I would use the shell and shell derived languages as to load the jvm for a filter is ridicules. If I need concurrency using the jvm seems the way to go as launch time isn't relevant in that use case. Of course if that's not good enough your either doing something wrong or need to evaluate other languages in order of speed c++, c, asm etc.
 
fonz said:
Can you provided some details of your system? Java will by design never be the fastest, but it isn't supposed to be VERY slow.

Fonz
Code:
>uname -a
FreeBSD mybsd.zsoft.com 8.2-RELEASE FreeBSD 8.2-RELEASE #2: Sat Feb 26 16:53:57 CST 2011     root@mybsd.zsoft.com:/media/G/usr/obj/media/G/usr/src/sys/MYKERNEL  i386

>dmesg -a|grep -i memory
real memory  = 536870912 (512 MB)
avail memory = 497008640 (473 MB)

I know the memory is too little to run Clojure. However, in the same box the "openjdk" under ArchLinux runs smoothly. So i feel the diablo-jre is slower than openjdk.
 
Java likes to have a lot of memory to play with. With 512MB the system will start swapping quite a lot which accounts for the slowness.
 
Back
Top