I've been programming for about 2 years, and so far Java is all I know.

When I made the switch from BlueJ to eclipse I noticed my old projects ran much faster. What would be the reason for this, as far as I knew the executing of java byte code is handled by the JVM and I still had the same JVM after I switched. Other than that does eclipse have had a different compiler? That's the only other thing I could think of.

Edit:

I timed it, the average runtime for, we'll call it A(100), in blueJ was 1 Minutes; 8 Seconds; 846 Milliseconds. In eclipse A(100) only took 8 Seconds; 459 Milliseconds. I've also noticed the increase for all my other programs too. I haven't measured those yet but the difference is definitely noticeable.

A() is a function that does alot of computation than prints of a chart of information based on what it found, fyi.

Did you measure this or is just a subjective impression?
–
VitorJul 10 '11 at 1:25

Eclipse uses it's own compiler, though I don't know how much of a difference it would actually make.
–
R0MANARMYJul 10 '11 at 1:30

1

Yes, Eclipse has its own compiler and it could optimize particular things for you quite well. It also runs the program in its own console. What you're experiencing might just be the speed of the console, as you didn't specify what kind of program you're running.
–
MacneilJul 10 '11 at 1:34

3

Could be that since BlueJ is a teaching environment and not just a Java development studio it's doing a lot of extra things behind your back, too.
–
Patrick HughesJul 10 '11 at 1:35

1 Answer
1

I think the main reason is that BlueJ runs your code in a VM with a debugger attached. BlueJ actually has two VMs running: the main one, and the one with your code inside (the user VM, aka the debug VM). The main VM has a debugger attached to the user VM, which allows it to do things like pause user code, inspect the state of objects and all sorts. I imagine this probably adds a fair bit of overhead (perhaps inhibiting the JIT compilation?); the speed that code executes is not a major concern for a learning environment like BlueJ, as long as it's reasonable.