[java] "Java faster than C in the average"

Started by
11 comments, last by StratMan 23 years, 7 months ago
SH4? What does that mean? If you mean really fast then the Visual Cafe 4.0 Expert edition and IBMs Visual Age for Java Enterprise edition compilers produce quite fast code too - in machine code.

The only GNU debugger available is gdb. That is text-based. There is a visual front-end called ddd (I think) but that has as far as I know only been written for X-Windows.

So by tieing myself to one compiler and and prevented from using visual debuggers and other utilities such as profilers, memory leak detectors, IDEs (you may argue that MAKE is better, but lets leave that discussion for another time) and so on.
So I think that being cross compiler portable even on the same platform is an issue worth caring for.

Being cross compiler portable means for instance that I can just throw in Java3D in my Symantec native code compiler, compile it and go. This is the issue with any 3rd party library that uses JNI. I like that.

Anyway, I think it is still a bit risky to use JGC for larger projects because it still seams to be fairly early in development. But much has happened since I looked at it the last time so things are certainly getting better. Maybe in a year or two it may really worth basing major projects in it. When this time has come is somewhat subjective though, so you might disagree. And I am problably quite biased. I already have a quite large code base using JNI and it would require significant work to redo in CNI.

One other thing. It is quite risky to base your development on one compiler. It might be bugged and you would then be unable to change compiler underway. Take for instance the Visual J++ that uses Microsofts RNI. Now that C# has come it is unlikely that J++ will be come in any new versions. If I had a code base written using RNI I would probably have to port it all to JNI (or CNI) now if I wanted to reuse that code.

Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games
Advertisement
What I''m saying is that it is the only compiler that will do what I want. There are 0 others that will do what I want. When you say Visual Cafe produces fast machine code you are stuck in the mindset that I am writing Intel based programs. I am not going to write something that will execute on a desktop or server that runs on an x86 CPU. So far GCJ is the only compiler i know that will make non-x86 machine code. If you can find another one then please tell me.

SH4 is the main CPU for the dreamcast (it doesn''t run a pentium anything)

I am totally aware that you don''t work on Intel based machines. I am not (and was not) stuck in any "mental midset". I just didn''t know what SH4 meant, thats all.

I have had plenty of experience myself with other architectures. For one thing I wrote a book on low-level programming on the Digital Alpha-architecture last year and taught a class (as an assistent teacher) in that same subject. I have programmed MIPS assembler and have used gcc a lot on both HP-UNIX, Linux and Digital UNIX.

And as for "portable" native code you are probably right. JGC is the only way to go. In fact, because use a using the same C++ compiler on all the platforms you will even be able to write somwhat portable libraries using CNI - assuming of course that you stay within the POSIX standard - and that the platform you are running on is UNIX. Of course - if you cross compile to the SH4 then there will be no such services available (I here assume that no UNIX version is available for the Dreamcast; only a gcc backend)

Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games

This topic is closed to new replies.

Advertisement