Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Fast Native Eclipse with GTK+ Looks 300

Mark Wielaard writes "The gcj team created a natively compiled build of the Eclipse IDE. The resulting binary starts up faster then with any traditional JVM since there is no virtual machine to initialize or slow byte code interpreter or just in time compiler involved. This means that gcj got a lot better since the last Slashdot story in December about gcj and Eclipse. Red Hat provides RPMs for easy installation. Footnotes has screenshots by Havoc Pennington of the Eclipse IDE with GTK+ widgets."
This discussion has been archived. No new comments can be posted.

Fast Native Eclipse with GTK+ Looks

Comments Filter:
  • by gumpish ( 682245 ) on Sunday August 03, 2003 @12:45PM (#6600365) Journal
    And [Java] continues to be hyped, and is being used less and less, as the speed continues to hamper it.

    Java is still some 40 times faster than Python. As hardware speed continues to obey Moore's law, performance per clock cycle becomes less important. (For many areas of computing anyway.)
  • Good for QNX (Score:3, Informative)

    by Animats ( 122034 ) on Sunday August 03, 2003 @12:51PM (#6600398) Homepage
    This will be useful for QNX, for which Java support is weak.
  • by MichaelCrawford ( 610140 ) on Sunday August 03, 2003 @12:53PM (#6600410) Homepage Journal
    My understanding (I may be wrong) is that the way that Microsoft's "managed code" works is that the installer creates a native compile of your application on your computer right when it installs.

    I don't know how well it works but I can see the potential.

  • Re:Plugins? (Score:4, Informative)

    by Anonymous Coward on Sunday August 03, 2003 @01:06PM (#6600481)
    I believe run-time loading works. GCJ also includes a bytecode interpreter, so it will use that (it'll be slower than a normal JVM, but if you know you'll be loading it, you can compile the plugin natively, I think).

    That was the case last time I looked at GCJ about a year ago. I ended up being unable to use it because of lack of windowing toolkit support. Anyone know the status on all that?
  • Re:load times (Score:3, Informative)

    by iabervon ( 1971 ) on Sunday August 03, 2003 @01:15PM (#6600527) Homepage Journal
    It's not such a big deal for Eclipse, but it matter a whole lot for command-line programs like jar and javadoc, where the amount of time spend running the program is less than the amount of time spend starting the program; this makes correspondingly more of a difference to programs using the traditional UNIX philosophy.

    Of course, java tends toward handling this differently, where java programs invoke each other inside the same runtime, but it makes mixing java and non-java tools annoying.
  • Re:load times (Score:4, Informative)

    by khuber ( 5664 ) on Sunday August 03, 2003 @01:30PM (#6600610)
    Java was never designed to start up quickly, though they did a lot of work on startup in 1.4.x. Startup time is slow due primarily to what is executed, not the JVM speed.

    I wrote a simple JVMPI method tracer. It's mind-blowing what all happens before your code is actually run. Here's a method trace I just ran with 1.4.2 for a simple program. [visi.com]

    -Kevin

  • by red_gnom ( 545555 ) on Sunday August 03, 2003 @01:34PM (#6600632)

    Of course, I don't see myself as a "Java programmer" or a "carpenter" or a "brick layer". I wouldn't take any pride in that. I have a degree in computer science...

    ...Because of the size and footprint issues, you can't do embedded with Java.

    To further extend your knowledge in computer science, look into the Internet tool called "Google". Using it can save you from ridiculing yourself by publicly posting uneducated statements:

    Embedded Java [google.ca]

  • by WhoDaresWins ( 601501 ) on Sunday August 03, 2003 @02:53PM (#6600987)
    Using Microsoft's IDEs - I have VC++ both 6 and 7 - is like pounding nails with my fists. Have you used Metrowerks Codewarrior? Now there's an IDE. It's a joy to use.
    While IDEs can be quite a personal preference thing, you don't quite mention anything specifically about what is so good about the Metrowerks IDE other than it being cross platform and easy to author web pages in(!). I mean come on neither of those are core IDE functionality. I would have given you more credit if you had any pointed things to say about how the Metrowerks IDE is better but as it stands now you aren't very convincing.
    If you prefer makefiles, there are command line tools that provide the same compiler.
    Huh? This is not a big deal. Almost every compiler in the world can do this including VC++.
    Visual C++ can't compile it because of its poor compliance to the standard.
    Its quite obvious that you haven't tried VC++ 7.1 (Visual Studio.Net 2003). Its has close to 95% plus ISO C++ compliance. The only major feature missing is "export" which has now been almost officially labelled as a misfeature by the C++ gurus on the standards comittee and no major compiler will implement it. You mentioned having VC++ 6 and 7 and yet you being totally unaware of the fact the most VC++ programmers were long aware that VC++ 7.1 would have close to full compliance, leads me to think that you aren't much a VC++ user and perhaps only use it because you have to.
  • by CustomDesigned ( 250089 ) <stuart@gathman.org> on Sunday August 03, 2003 @03:10PM (#6601071) Homepage Journal
    IBM's AS/400 JVM does exactly this. Java byte code is compiled the first time it is run and optimized for the exact processor and OS version. The binary is managed transparently by the JVM and updated when the bytecode changes. On AS400, this is all integrated with the filesystem (i.e., you can't screw it up by touching with a funny date).

    You get all the advantages of Native compilation, and system specific JIT compilation combined - at the expense of more complexity and lots more disk space.

    As others have mentioned, M$ is attempting to do a similar thing with .NET. Whether they can do as good a job without charging AS/400 prices remains to be seen.

    As wonderful as all this is, I still like direct bytecode execution because it minimizes memory use and startup - which is more important than CPU for many applications (business logic and embedded). Native compiled code is quite a bit bigger than bytecode, uses more memory, and takes longer to load (though not as long as JITing the bytecode).

  • by lokedhs ( 672255 ) on Sunday August 03, 2003 @03:21PM (#6601128)
    I believe such a shell has already been written. And yes, loading a Java class and execute code in it is a lot faster than starting up an external application.

    You can't expect the average slashdot reader to understand these things too. It's much "cooler" to complain about Java speed and it is to actually learn somehting.

    These kinds of discussions always occur whenever Java or IPv6 is the topic. I remember back when I was young we actually embraced new stuff, especially new stuff that is cool, and useful, and... well I've talked for too long.

  • by lokedhs ( 672255 ) on Sunday August 03, 2003 @03:28PM (#6601168)
    In general, GCJ compiled code is slower than the smae code running in the JVM. The only speed advantage comes from the startup times.

    Often the JVM will out-perform GCJ with a factor of 3. Check out the numbers on this page [shudo.net].

    I fail to see why people want to run a GCJ compiled evrsion of a development tool and run at at one third of the speed of the JVM, just in order to save a few seconds of startup time.

  • by thimo ( 36102 ) on Sunday August 03, 2003 @04:21PM (#6601389) Homepage
    A quick test (using an Eclipse 2.1.1 from eclipse.org):

    Eclipse 2.1.1 with JVM
    - Second start: 13 seconds
    - Memory Eclipse: 80 MB
    - Memory JVM: 65 MB

    Eclipse 2.0.1 without JVM
    - Second start: 9 seconds
    - Memory: 96 MB

    The download page seems to indicate you're downloading an Eclipse 2.1.0 version, but the about dialog says 2.0.1. Which one is it?

    Cheers,

    Thimo (back to coding in Eclipse 2.1.1 :)
  • Re:Why JVM? (Score:5, Informative)

    by the eric conspiracy ( 20178 ) on Sunday August 03, 2003 @04:22PM (#6601395)
    Dynamicity? No. Java is a aggressively static language.

    Static types perhaps, but very dynamic when it comes to linking. Java has a lot of support for things like dynamic class loaders that lead to a very nice plug-in architecture, and extreme flexibility when it comes to deployment of code updates to a running application. Not to mention fun with diddling bytecodes on the fly.

  • Re:Why JVM? (Score:3, Informative)

    by be-fan ( 61476 ) on Sunday August 03, 2003 @04:43PM (#6601480)
    I hate you slashdot. Now, let's try this with the code samples in place?

    I don't think 'Dynamicity' is a word. But hey, enlighten me?
    >>>>>>>>
    It's not a word. But I'm referring to how dynamic the language is. In Java, dynamic method invocation is very limited --- just basic single argument polymorphism. Other languages have much greater dynamic capabilities: For example, in Dylan (chosen because its syntax is easier for most people to follow), I can do the following:

    let vec = make(<vector>, size: 100);
    // ...fill vector...
    for(i from 0 below 100)
    do-foo(vec[i]);
    end;

    Now, this will go through the vector, and call the appropriate version of do-foo for each time in the vector. The cool thing is that it doesn't matter what the types in the vector are, or how they're related. If they have a do-foo() defined for their class, the runtime will do the right thing automatically. In Java, to get the same effect, you'd have to use check to type of each variable, cast it to the right type, then call do-foo() for each type that could be in the vector.

    Nup, not even. See 'instanceof' - which, although considered hackish among OOP elites, gives volumes compared to using void pointers in C. Then there's the whole polymorphism thing, but hey - C is procedural.
    >>>>>>>>>
    I said "almost" as inflexible as C. Certainly, its not any more flexible than C++. But either way, its not what I mean by flexible. Now, let's continue the previous example. The last Dylan example would run rather slowly, about at the speed the "giant switch on types" Java version would run. Now, if you don't need to store multiple types in the same vector, you can simply use a limited type. Just change one line to:

    let vec = make(limited(<vector>, of: <integer>));

    Now, as long as there is a do-foo() method defined for integers, the compiler will automatically specialize <vector> (think templates in C++) for the type, detect it can now statically dispatch the do-foo() method (because the argument will always be an <integer>) and most likely inline the do-foo() method into the loop. As a result, the loop will benchmark within spitting distance of C++ using the vector<int> template.

    Someone correct me if I'm wrong, but AFAIK the JVM acts as a sandbox for Java applications/applets, stopping those which don't have the necessary permissions for privileged operations. This adds volumes to safety.
    >>>>>>>>>
    It only needs to do security checks because it is a platform as well as a language. In a natively compiled language, those security checks would be handled by the underlying OS. The main thing the underlying OS can't do is memory checking, which is why the JVM does bounds checks and whatnot. But compiler technology has advanced so far that you don't need something like the JVM to look at each memory access before allowing or disallowing it. Lots of safe languages (again, Lisp, Dylan, even C in the case of the SAFEcode project) are compiled to native code, with the compiler emiting only a few bounds checks here and there.

    You also forgot the biggie: portability. C and C++ are portable to a degree, but require recompilation.
    >>>>>>>
    Lots of languages are natively compiled and fully portable at the same time. The requirement for portability isn't running on a JVM, but preventing platform-specific pointer manipulation, as well as specifying sizes for various objects. Again, there are lots of other languages that do this! Heck, even C++ is pretty good at this, as long as you avoid "implementation specific" operations (which are clearly marked as such). The only reason that Java seems more portable is the giant standard class library. You can get largely the same result by using Qt and some well chosen libraries like ACE.

    If you want speed, get Linux and gcj it (never actually tried gcj trolls - sue me if it sucks
  • by be-fan ( 61476 ) on Sunday August 03, 2003 @05:38PM (#6601745)
    Python is totally dynamic. Python functions can be completely generic. For example:

    class bar(object):
    def foo(self, obj):
    obj.register(self)

    bar::foo() is completely generic. It can register itself with any object, as long as that object supports the register() method. In Java, you'd have to define an interface and have all possible objects you're interested in registering with implement that interface.

    Object oriented languages have similar capabilities, but they do *not* all offer the same abstraction capabilities. Java is a lowest-common-denomenator OO language. Its got classes, single inheritence, single-parameter polymorphism, and that's about it. It certainly doesn't have the abstractive capabilities of C++ (with templates) much less something even higher level like Python.
  • by Tom7 ( 102298 ) on Sunday August 03, 2003 @05:39PM (#6601748) Homepage Journal
    I checked out the numbers, but GCJ seems to be just barely edged out by Hotspot in most cases. Considering that GCJ is free and allows you to distribute native binaries, that's pretty good.

    They don't have figures for memory usage, installation profile, etc., and I bet in those areas GCJ beats Hotspot for end-users. And you can't beat an install with no library dependencies.

  • by __Reason__ ( 181288 ) on Sunday August 03, 2003 @05:40PM (#6601755)
    It runs very nicely! The native-compiled eclipse is noticably more snappy and responsive than it is on the JRE 1.4.2 on my (XP 1800) machine. It also seems quite stable - I stress-tested it for about half an hour last night and couldn't produce any bugs or crashes.
  • by atgreen ( 690376 ) on Sunday August 03, 2003 @05:43PM (#6601765)
    Eclipse contains a java compiler which you can also compile as a standalone app with with gcj (see http://sources.redhat.com/rhug). The gcj-compiled compiler is almost three times faster than the latest IBM JRE run version.
  • BitTorrent url (Score:2, Informative)

    by PourYourselfSomeTea ( 611000 ) on Sunday August 03, 2003 @07:04PM (#6602082)
    Get your torrent here [homelinux.org]
  • by ChannelX ( 89676 ) on Sunday August 03, 2003 @11:12PM (#6603324) Homepage
    I still dont get why you need to restart Eclipse to go into another editor. Run them both at the same time. IIRC the Eclipse editor will detect the new file changes.
  • by Kynde ( 324134 ) <kynde@iki.COWfi minus herbivore> on Monday August 04, 2003 @04:55AM (#6604305)

    Just so you all know. A good jit/hotspot compiler can make things quite a bit faster than any static build compiler. This is because at runtime certain optimizations are possible that simply cannot be done at build. These optimizations are typically very aggressive, to that extent that later on in execution it may turn out so that those snippets have to be thrown away and recompiled. And thus they usually target only the hotspots, i.e. portions of code that are being executed inside tight loops, which is usually where compile time savings occur anyway. The speed of the rest of the code is pretty much governed by the programmer anyway along with his choice of algorithms and data structures.

    A good example of such snippets would be the inlining of a virtual method, turning a virtual method recursion into a loop along with some unrolling, inlining function pointer call (which is basically the same as virtual method call).

    Mind you, ofcourse a hotspot compiler could also be implemented to a C/C++ runtime environments, but I haven't heard of anyone actually taking that path.

    (for the record, I'm a C programmer and rarerly write much with java)
  • by Coward the Anonymous ( 584745 ) on Monday August 04, 2003 @09:37AM (#6605197)
    "I think .NET is just in time compiled, similar to Java."

    .NET is JITed by default. But the SDK comes ngen.exe, a tool that will create a native image. You can setup an installer to compile the MSIL to native code on install also.

    "If what you said is true, we wouldn't be able to copy an executeable from one computer to another. It would have to be installed."

    The native image is cached, it doesn't overwrite the .exe that of MSIL that someone gives you. So if someone has "installed" an app and it was compiled on install, you could still use the .exe. The runtime would recompile the code for your machine.

This file will self-destruct in five minutes.

Working...