For any reasonably compute intensive task, compilation and optimization time is negligible.
I don't think that's the case, at least not if you want C-like performance. But I don't know for sure, so I'll concede that point.
...no different from what the C compiler does...
Not too convincing. I certainly wouldn't want to run a C compiler at runtime.
Well, so what? The necessary dependency tracking is both trivial and fast.
Do you have any evidence for this, or should I just believe you?
Furthermore, because of the way Java is designed (and unlike C), there are only very few important dynamic optimizations that dynamic loading can invalidate.
Baloney. New classes can invalidate practically everything from inlining to monomorphic dispatch to constant propagation to you name it.
Are you talking about JIT compilation, or dynamic compilation? I think they're two orthogonal things. JIT is really just static compilation done at runtime. It doesn't take dynamic conditions like input data values or runtime type information into account, as I understand it.
The HP Dynamo work is an example of dynamic compilation that has nothing to do with JIT.
Note that Java does not support class reloading in high performance code (it's supported only for debugging).
What do you mean by "reloading"? I'm talking about class loading, which is an integral part of executing a Java program. If you're forbidding that, you might as well do static compilation.
Dynamic optimization is completely up to the task of compiling Java as well as any C compiler compiles C code.
But the dynamic compiler runs at runtime. How well it compiles isn't really the issue. It could compile the code down to nothing, and still take longer than a statically-compiled version, because the compilation overhead counts. You end up having to sacrifice optimizations like graph-colouring register allocation in order to save time. So no, the dynamic compiler can't necessarily do as good a job as a C compiler and still keep compilation overhead low.
The truth is, I haven't done any dynamic compilation work, but what you're saying contradicts what I've been told by fellow researchers who implement dynamic compilation for Java, so please excuse me if I'm skeptical.
Actually, the P4 has a Trace Cache which smells something like embryonic code morphing. Clearly it is not nearly as powerful, in terms of optimizations, but it seems a future Pentium (or even the Itanium) with code morphing is not out of the question.
I'm willing to sacrifice my 50 Karma to prove that I am serious.
Can you see that I am serious! Join me or die. Can you do any less?
(Oh, and if you want to be taken seriously, I think it may be better to articulate your point than to say with "screw you" and "please don't mod me down". I think your post would be more effective if you just trimmed out the rants.)
Actually, that's centripetal acceleration. (Look at the units.)
Let us say that the radius needed to prevent someone from getting sick is 1/30 the radius of earth...
Where did you get that number from? Your whole argument depends on it. Why not 1/30 the radius of the galaxy?
Look:
1/6g
1km tether
29m/s rotation
33 revolutions per hour
I'm no materials scientist, but I suspect we could build a tether like this today.
Remember that your feet point outward, so the vertigo effect isn't as bad as if you were turning sideways. AFAIK, vertigo comes from two sources: coriolis effects, and the rotating view out the window. The latter could be corrected by using non-rotating video cameras instead of windows. As for coriolis, I don't know how to compute that, but I suspect it's small enough to go unnoticed by the inner ears of the crew.
Of course. Frames that are 1/15 second apart are going to be roughly twice as different as frames that are 1/30 second apart. I think that's pretty obvious.
Look, if you can improve on a video compression scheme by doing something as simple as tossing every second frame, then it couldn't have been a very good compression scheme in the first place, could it?
Right. So the waves that bounce off that mirror Mr. Alien is holding up won't come right back to us.
I think a better idea is to aim the signal to intergalactic space, and then when you need the data, just wait for warp drive to be invented so we can fly past the data stream and receive it as it passes by.
Even compressed, you're compressing half as much to begin with so the savings will be 50% + compressed savings. You'll still be ahead of where you were.
Not substantially. Adjacent frames in a video are so similar that any decent compression algorithm should do a very good job on them. I'm no compression expert, but I'd expect only a few percent improvement if you skip every other frame.
In fact, the Java approach is better than the kind of batch compilation found in C/C++ because it allows for a lot more optimizations.
I wouldn't go that far. There are several things impeding Java optimization:
It occurs at runtime. With C/C++, you have unlimited time to optimize the code. With Java, time spent optimizing counts against program execution time.
Java bytecodes use a stack-based paradigm, which is notoriously hard to optimize. Most C compilers have a register-based paradigm, whose optimization is well-understood (if perhaps not yet perfected).
Java programs load classes dynamically. Every new class has the potential to clobber any assumptions you made in order to achieve any agressive dynamic optimizations. In the worst case, a Java runtime has to have all the functionality of "make" so it can compute what has changed and re-compile it as necessary.
Dynamic optimization has a lot of promise, but with the state of technology today, it's hard to argue that C isn't faster than Java.
<SPOILER> You're right of course. That wasn't meant to be a nitpick. I was just giving it as an example of why I thought the movie would end with a definite indication that Prot was not an alien.
Of course there may be reasons that it makes sense anyway: perhaps round-trip interstellar travel is always timed according to the destination's schedule. Who knows.
</SPOILER>
I disagree about the ending. It seemed like a ham-handed way to make people think it's ambiguous, but by that point in the movie, I didn't really care any more.
<SPOILER> I thought this was going to turn into a cool story about a person so traumatized by events in his family that he fantasized about a planet without families.
I thought we had been given clues to this: for instance, if he has to leave at a certain time because of the scheduling of interstellar travel, then why is he leaving exactly five earth years after he arrived? Does everyone in the universe schedule their travel based on earth time?
However, instead of turning and facing this head-on, they took the easy road and left it ambiguous.
They could have used the ambiguity in Spacey's character as a way to explore various themes about human nature; but instead, that ambiguity itself is pretty much all there is to this movie.
Incidentally, Spacey's performance was great. During the hypnosis, he has to portray a wide variety of characters, and he does it very convincingly.
</SPOILER>
In short, K-PAX is nothing but a premise: is he an alien or not? I don't need to sit in a theatre for two hours to grasp that premise.
Are you talking about JIT compilation, or dynamic compilation? I think they're two orthogonal things. JIT is really just static compilation done at runtime. It doesn't take dynamic conditions like input data values or runtime type information into account, as I understand it.
The HP Dynamo work is an example of dynamic compilation that has nothing to do with JIT.
What do you mean by "reloading"? I'm talking about class loading, which is an integral part of executing a Java program. If you're forbidding that, you might as well do static compilation. But the dynamic compiler runs at runtime. How well it compiles isn't really the issue. It could compile the code down to nothing, and still take longer than a statically-compiled version, because the compilation overhead counts. You end up having to sacrifice optimizations like graph-colouring register allocation in order to save time. So no, the dynamic compiler can't necessarily do as good a job as a C compiler and still keep compilation overhead low.The truth is, I haven't done any dynamic compilation work, but what you're saying contradicts what I've been told by fellow researchers who implement dynamic compilation for Java, so please excuse me if I'm skeptical.
Interesting experiment: post a reasonable-souding article with a troll subject line, and see what the moderators do.
The only trouble is that your post is content-free, so this is an unmitigated troll. However, I don't feel like wasting my mod points on it.
Have a nice day.
"The mercy"? What exactly is this doomsday scenario you're afraid of?
Actually, the P4 has a Trace Cache which smells something like embryonic code morphing. Clearly it is not nearly as powerful, in terms of optimizations, but it seems a future Pentium (or even the Itanium) with code morphing is not out of the question.
Good point. :-)
Downfall? I do not think that word means what you think it means. How about handicap?
(Oh, and if you want to be taken seriously, I think it may be better to articulate your point than to say with "screw you" and "please don't mod me down". I think your post would be more effective if you just trimmed out the rants.)
Look:
-
1/6g
-
1km tether
-
29m/s rotation
-
33 revolutions per hour
I'm no materials scientist, but I suspect we could build a tether like this today.Remember that your feet point outward, so the vertigo effect isn't as bad as if you were turning sideways. AFAIK, vertigo comes from two sources: coriolis effects, and the rotating view out the window. The latter could be corrected by using non-rotating video cameras instead of windows. As for coriolis, I don't know how to compute that, but I suspect it's small enough to go unnoticed by the inner ears of the crew.
It's simple, really. The Monty Hall effect explains the uncertainty regarding whether to choose door #1 or door #2.
I was saying "boo-urns".
Ok Mr. Smartypants, settle down. So some people got taken by the gag--it's not the end of the world.
Salt is sodium chloride. Cesium chloride is a salt I guess, but it's not table salt.
What difference does that make? Two times zero is zero.
Of course. Frames that are 1/15 second apart are going to be roughly twice as different as frames that are 1/30 second apart. I think that's pretty obvious.
Look, if you can improve on a video compression scheme by doing something as simple as tossing every second frame, then it couldn't have been a very good compression scheme in the first place, could it?
Right. So the waves that bounce off that mirror Mr. Alien is holding up won't come right back to us.
I think a better idea is to aim the signal to intergalactic space, and then when you need the data, just wait for warp drive to be invented so we can fly past the data stream and receive it as it passes by.
-
It occurs at runtime. With C/C++, you have unlimited time to optimize the code. With Java, time spent optimizing counts against program execution time.
-
Java bytecodes use a stack-based paradigm, which is notoriously hard to optimize. Most C compilers have a register-based paradigm, whose optimization is well-understood (if perhaps not yet perfected).
-
Java programs load classes dynamically. Every new class has the potential to clobber any assumptions you made in order to achieve any agressive dynamic optimizations. In the worst case, a Java runtime has to have all the functionality of "make" so it can compute what has changed and re-compile it as necessary.
Dynamic optimization has a lot of promise, but with the state of technology today, it's hard to argue that C isn't faster than Java.<SPOILER>
You're right of course. That wasn't meant to be a nitpick. I was just giving it as an example of why I thought the movie would end with a definite indication that Prot was not an alien.
Of course there may be reasons that it makes sense anyway: perhaps round-trip interstellar travel is always timed according to the destination's schedule. Who knows.
</SPOILER>
So why mention the scheduling thing at all? Why not come up with some other reason for the five-year stay?
I disagree about the ending. It seemed like a ham-handed way to make people think it's ambiguous, but by that point in the movie, I didn't really care any more.
<SPOILER>
I thought this was going to turn into a cool story about a person so traumatized by events in his family that he fantasized about a planet without families.
I thought we had been given clues to this: for instance, if he has to leave at a certain time because of the scheduling of interstellar travel, then why is he leaving exactly five earth years after he arrived? Does everyone in the universe schedule their travel based on earth time?
However, instead of turning and facing this head-on, they took the easy road and left it ambiguous.
They could have used the ambiguity in Spacey's character as a way to explore various themes about human nature; but instead, that ambiguity itself is pretty much all there is to this movie.
Incidentally, Spacey's performance was great. During the hypnosis, he has to portray a wide variety of characters, and he does it very convincingly.
</SPOILER>
In short, K-PAX is nothing but a premise: is he an alien or not? I don't need to sit in a theatre for two hours to grasp that premise.