• Jimjim (unregistered) in reply to aerosgsrgi
    aerosgsrgi:
    Who still uses 512MB of RAM?

    PS3 only has 512...

  • aerosgsrgi (unregistered) in reply to Jimjim
    Jimjim:
    aerosgsrgi:
    Who still uses 512MB of RAM?

    PS3 only has 512...

    Yes, and a Commodore 64 has 64KB of RAM. Context... It's a useful social skill to learn.

  • Anonymous (unregistered) in reply to Sigivald
    Sigivald:
    That and the Intel chips have been RISC inside since the Pentium Pro back in late 1995.

    So I guess they're crappy and less efficient than RISC because they've been RISC internally for over 12 years now?

    x86 is not reduced-instruction. there are elements of the architecture which mimic risc, such as micro-operations which break some instructions down to their very-low-level cousins. however, a load command which requires arithmetic has specific logic hardware so that it does not require an arithmetic operation thereby blocking the MMU (i.e. memory addressing). x86 is a bit complicated like that. so no, it's not "true" RISC.

    Sigivald:
    Do you expect us to believe that microcode translation of x86 instruction is that expensive?

    The further you complicate pipelining, the more expensive the hardware design & implementation can get. Your sarcasm is noted, though, because generally x86 can keep up with any other risc implementation. (generally)

  • (cs) in reply to Anon
    Anon:
    Volmarias:
    Well, everything just works fine on my setup. INCLUDING Java. Java is NOT "just slow, period." You're being unreasonable, there is something wrong with your setup, and you're refusing to admit the possibility, instead insisting "JAVA IS SLOW SO THATS WHY JAVA IS SLOW!!!!!!" and sticking your fingers in your ears.
    Fine, genius. Explain what on earth could be causing Java programs and only Java programs to run like absolute crap on my machine.

    Suggest something I can change that would magically make Java run faster than it already does.

    I'm already using the latest version of Java (1.6.0_05) and the latest stable release of Eclipse (3.3.2).

    What would you suggest I change? Keep in mind that all software that is not Java works perfectly.

    Check the options you're passing to the JVM. It's entirely possible that you're saying "use 128MB for the heap as the maximum", and your apps end up getting memory starved. For that matter, check how much memory you have free, how much your java apps are using, and which version of Java is actually being used to launch them (it's possible you're calling against 1.4 by accident). Eclipse stores its parameters in eclipse.ini; take a look there, and see what's going on. Disable antivirus software; it may be aggressively interfering with what you're doing, though I haven't really had that happen with me.

    Frankly, I've never had this type of issue, so I haven't got the best ideas on how to troubleshoot it, but I'd suggest popping into #java (and/or #eclipse) on irc.freenode.net and seeing if they can suggest anything, or posting on the sun forums and asking for information there. I'd definately create and run some "Hello World" complexity app, and run it on a different machine (preferably one with no connection to your work, so it would be set up different) and compare relative speeds with that, just to see just how bad things actually are.

  • Jimjim (unregistered) in reply to aerosgsrgi
    aerosgsrgi:
    Jimjim:
    aerosgsrgi:
    Who still uses 512MB of RAM?

    PS3 only has 512...

    Yes, and a Commodore 64 has 64KB of RAM. Context... It's a useful social skill to learn.

    Thank you for the offensive reply !

    Well, I was trying to point that not all developer target their application for 1 gig of RAM...

    Kind-hearted... It's a useful social skill to learn !

  • SomeCoder (unregistered) in reply to Jimjim
    Jimjim:
    Well, I was trying to point that not all developer target their application for 1 gig of RAM...

    And it would be nice if developers for the PC would remember that just because we have 2 GB of RAM in there, doesn't mean we want one single app to consume it all just because the programmer was lazy and/or stupid :)

  • (cs) in reply to eryn
    eryn:
    the GC doesn't do anything while it detects user activity in Java... you can't even force it to collect, unlike in the .NET framework where you can. That's a reason why some apps have such big memory footprints, they wait for a lull in activity before they cleanup.

    I've seen/worked with/written/laughed at some hideously slow .NET applications, you don't see me blaming the Framework.

    ...perhaps it has some quintiple nested loop operations with hundreds of String concatentation operations.

    Ever heard of System.gc()? That should do the trick. And even if I prefer VS2005 or IntelliJ I need Eclipse and I'm running it on a Centino 1.7GHz CPU with 2gig ram and its performance is great.

  • SeaDrive (unregistered)

    Why would development (team of 100?) or QA (team of 10?) require the full kit? Especially if the app was informational and not financial transactions per the description.

  • Edward Royce (unregistered) in reply to Anon
    Anon:
    ... Try and do anything more complicated than text editing, and you're in for even more slowdowns.

    So, no, Java being slow on the desktop is NOT A MYTH. If you've ever used a Java desktop application recently, you'd know that.

    Frankly I have to agree.

    I work mostly with .NET tech but I've been playing around with Java lately using Eclipse. ... It's a dog. The VS ide is vastly superior.

    IMO it's like programming with my fingers in a pool of molasses.

  • MA (unregistered)

    Why people still think that java is slow? That is so 90s

    http://www.infoworld.com/archives/emailPrint.jsp?R=printThis&A=/article/08/03/26/java-speed_1.html

    And I don't know why people say that eclipse is so slow, I find it even faster than VS 2005. And the guy who keeps saying that it crashed should check his eclipse.ini and change the maximum memory that eclipse uses that may be his problem. Although unless you are using many extensions like JBoss Tools you should not have that problem.

    BTW, another successful Java application is Azureus.

  • mike (unregistered) in reply to Steve H.
    Steve H.:
    Sounds to me like Sun was the company responsible for a lot of the WTF (though Chris G's company approved it and paid for it). Seriously, Sun was the one that recommended buying $36M of their equipment, said company was just following their recommendation.

    Can you sue someone for a grossly bad recommendation? I know I'd look into that option if I was out $36M

    Bah... as someone who works for a hardware vendor if I was told to size a solution for a certain number of users, probably a lot by the look of it, then I would have done the same thing. If I was told to size for 100 users, then it would have been a PC sitting on someones desk. You can't blame the vendor for a lack of analysis on the customers part, the vendor can only work with the information they're given. And personally I don't have a problem with taking advantage of stupid people.

  • Azeroth (unregistered)

    The problem with slowness of Java applications is something that's not about benchmarks, it's about experience. When you forget the loading speeds and talk about basic operations like scrolling, opening windows, switching tabs in IDEs written in Java, there is some kind of annoying, almost mocking delay, too little to measure but too large to provide enjoyable experience. You can't expect well optimized natively-compiled system run slower than one depending on some cross-platform framework/pseudo-compiler. It's against the laws of physics. About the same speed is the max you can hope for.

  • Edward Royce (unregistered) in reply to RH
    RH:
    yEAH rIGHT:
    ...and if you go to www.e10k.net, you can buy one of them at kentucky steakhouse !

    Probably using it to charbroil the steaks.

    Hmmmmm.

    You know. I'd make it a point to visit a steakhouse that did that!

    Now that would be pretty bloody cool.

  • Sundry (unregistered)

    Absurdly large Sun hardware installations go hand-in-hand with big consulting jobs. My (rather large) consulting firm is developing the new billing system for a major telco. The infrastructure team have given up describing the hardware in terms of CPUs and disks, and now measure it by weight... I think we're up to about 3.6 tonnes of Sun equipment now.

  • exSolarisSysAdmin (unregistered)

    Yeah, and the smart companies were picking up "retired" Sun servers for about 5c in the $ after the dot boom. Put a lot of Sun sales rep out of commissions for a coupla years.

  • (cs) in reply to Anon
    Anon:
    ...

    So, no, Java being slow on the desktop is NOT A MYTH. If you've ever used a Java desktop application recently, you'd know that.

    Hey, you have to forgive them for their lack of experience with fast computing. Some of us like to use assembler (still working to have a good line editor written, Real Soon Now). Now, for REAL speed: try solder.

  • dag (unregistered) in reply to SomeCoder
    the GC doesn't do anything while it detects user activity in Java... you can't even force it to collect, unlike in the .NET framework where you can. That's a reason why some apps have such big memory
    You can't force the .NET framework to garbage collect either. You can suggest that it run the GC, but it won't necessarily do it on that exact call.

    Just out of curiosity (I don't do Java) what exactly does java.lang.System.gc() do? The doc doesn't read as if it only schedules a gc for later.

  • ThatGuy (unregistered)

    On the article: going with e10k may have been a wise choice. Providing that they were using the same hardware inhouse (as pointed out by an other user, makes sense for a bank to have e10ks), maintenance costs by their existing team with hardware that were familiar with may have been cheaper in the long run than hiring a new team to maintain new hardware. Typically, hardware is far cheaper than the people that operate it.

    On Java: lol. I've used java for years, on desktop and mobile. On windows and linux. It is slow. That's it, end of discussion. Compared to native, you can't compare, obviously. With native, you double click/execute, your code just runs. It executes right away. Bingo! With Java? JVM loads, classes are loaded (JAVA in it's brilliant design, has classes littered over the file system if not bundled in jar files, C# grately improved on this by forcing things to compile not to individual classes but into libraries (dlls) speeding load time considerably). The IO is by far the slowest operation your CPU does because it has to wait, a CPU waiting is a CPU not executing code from your app (multithreading is not helping loading java classes as it's IO bound). Once all this is done, your code executes. This is fairly fast obviously, as benchmarks show, Sun did a decent job over the years to optimize the JVM. The initial cost of starting the JVM and launching the app is why java is so slow in small apps. This is also why it is largely slower on mobile that run from flash and have flash memory. Java also tends to use memory a lot (eclipse, netbeans, etc.) and with more memory used, the more your system is going to page, windows also likes to page applications that you minimize to the task bar. Again, more IO which slows things more. This is something all applications suffer with but the more memory they use, the more apparent it will be (I see this with firefox everyday, sigh). Also, on mobile, I suspect the jvm (and it's knock offs) do not have the heavy optimization the desktop JVM has, again adding to the java is slow thing.

    On eclipse: Eclipse is slow, largely for the reasons stated above. Also something very popular in Java (and C#, sigh), is the whole encapsulation and "proper design" in OO. OO by it's design, is slow, lots more methods means lots more method calling and setting up the stack, registers is slow. It is obviously slower in a VM. This is seen not just in eclipse but in java everywhere (and C#/others). This philosophy is not as prevalent in c/c++ where "ugly code is good code". (I work in video games, I see my fare share of ugly, fast C++ code, thanks) The java community seems based on a best-of-breed approach where many frameworks do the same thing and in the end, one or two strongest survive and get to be used by everyone (hibernate, swing, struts, etc.) and magical enterprisey xml is in between everything to make it hold (a-la magical ducttape) and xml parsing is IO bound and slow.

    Eclipse mind you, does a number of things very well and I generally like it. Searching in large source code bases for methods/etc, it is very quick (much quicker than searching in VS in large C++ projects). I am also quite happy that they are in the process of starting a new version with a "fresh" code base free of all the slowness.

    I've also seen eclipse being unusable on some flavors of linux on high end desktops (1g ram, etc) because of the gtk native backend. Then again, if you run linux, i'm not sure why you'd want to use eclipse but oh well.

    Also, a number of tools from IBM run on top of eclipse. While I was working for IBM, we had this tool RAD (Rational application dev-something) which is like an enhanced version of eclipse built on top of it. Lots more plugins, lots of xml enterprisey stuff, lots of slowness. I remember mine on a 3.4ghz 2gb ram desktop taking over 5mins to LAUNCH. Not funny, I clocked it one morning while I went to grab a coffee. It'd use so much RAM that coming in in the morning, I'd find it almost entirely paged to disk if I left it running and just bringing the window back to a usable state of responsiveness would take even more time. Once loaded though, it was quite usable, again, thanks to heavy optimizations in the JVM and in the code (at the cost of memory...).

    On C#: Yeah, C# is as slow as Java. Main differance being that with C#, a service is launched on first app execution that is reused with other instances making their startup time much quicker (Java has/or is doing this, not sure but I know JEdit does something similar at least). Execution wise, C# may be slightly faster by the way the language implements generic at the VM level but I also believe it uses a bit more memory at runtime.

    On mobile apps: Java makes a decent choice, (as pointed before by some other users) mainly because of portability with little code modifications to run on many devices, NOT because of speed of execution. A lot of the JVM optimizations (compiling methods to native code, etc.) are memory intensive, something usually scarce on mobile devices so launch time and execution time is considerably slower (processor speed aside). C# would suffer the same fate on mobile if it ran (does it? no idea but I'm sure that if it does, it's not any faster)

    On software design: Most people are teached in school/work to make easily maintainable designs. This is OO/AOP design I'm talking about. By their very nature, they are not designed to execute fast, they are designed to be easily maintained and readable. OO slows down code if taken to extremes considerably with method invocation overhead and AOP is even slower (adds considerable overhead if not used properly or for wrong purposes).

    There is an other kind of design not often teached: design for speed. This is what most games on consoles/PC HAVE to use to maintain FPS. Data structure alignment matters more than you'd think and often, aligning data means that instead of storing 1000000 vectors of x,y,z you'll instead store 3 arrays of 1000000 values (x,y,z) just because cache hitting will be better thus reducing memory hits, prefetching, etc. This code will not be easily maintainable by other people or in the future, this is why working on a game with legacy code is a nightmare (those who are/have, I bow to your courage/patience).

    The former type of design was pushed heavily by Java proponents (and C#) especially because it matters a lot more in the corporate world where it doesn't matter if your CRM app is slow as hell when it has billion lines of codes you need to maintain everyday forever. (This is quite true, working at IBM we had to build a system interacting with a client's RPG system because they just couldn't get rid of it, it became too critical so we were building Java on top and extending in Java. You just know that in 20 years, some other language will have to interface with the java system that interfaces with the RPG system and you just know they will still have RPG/java developpers on staff. This is why COBOL will sadly never die and why you'll eb able to make a living with it forever)

    On the GC: You can't force the Java GC to run, and i'm pretty sure the same applies to C#. Where System.GC or it's equivalent is just a suggestion. As pointed out, the Java/C# GC implementation is very good at what it does and speed wise, generational garbage collecting is as good as it gets without using too much memory. The GC is not why the language is slow overall but CAN contribute to perceived slowness where you click on something, GC fires, you wait, GC terminates and your thing pops up, yeah, it can(and will) happen. It's no LISP GC but it does the job. You just don't appreciate enough memory being managed for you until you are forced to put a hardware breakpoint to see who writes and trashes your memory address in some C++ app, it's just not fun...

    These are the reasons why java is slower (in appearance and reality) depending on use/software/environment. Just stop bashing it, it's perfect (with C#) for it's intended use and it definately performs as designed (it was designed for portability, not speed and they did achieve their goal).

    Sorry for the lenghty post, i'm just tired of seeing people complain/argue against java without knowing wtf they are talking about. Please go on discussing the article, it isn't about java :)

  • Anonymous (unregistered) in reply to ThatGuy
    ThatGuy:
    On the article: going with e10k may have been a wise choice. Providing that they were using the same hardware inhouse (as pointed out by an other user, makes sense for a bank to have e10ks), maintenance costs by their existing team with hardware that were familiar with may have been cheaper in the long run than hiring a new team to maintain new hardware. Typically, hardware is far cheaper than the people that operate it.

    On Java: lol. I've used java for years, on desktop and mobile. On windows and linux. It is slow. That's it, end of discussion. Compared to native, you can't compare, obviously. With native, you double click/execute, your code just runs. It executes right away. Bingo! With Java? JVM loads, classes are loaded (JAVA in it's brilliant design, has classes littered over the file system if not bundled in jar files, C# grately improved on this by forcing things to compile not to individual classes but into libraries (dlls) speeding load time considerably). The IO is by far the slowest operation your CPU does because it has to wait, a CPU waiting is a CPU not executing code from your app (multithreading is not helping loading java classes as it's IO bound). Once all this is done, your code executes. This is fairly fast obviously, as benchmarks show, Sun did a decent job over the years to optimize the JVM. The initial cost of starting the JVM and launching the app is why java is so slow in small apps. This is also why it is largely slower on mobile that run from flash and have flash memory. Java also tends to use memory a lot (eclipse, netbeans, etc.) and with more memory used, the more your system is going to page, windows also likes to page applications that you minimize to the task bar. Again, more IO which slows things more. This is something all applications suffer with but the more memory they use, the more apparent it will be (I see this with firefox everyday, sigh). Also, on mobile, I suspect the jvm (and it's knock offs) do not have the heavy optimization the desktop JVM has, again adding to the java is slow thing.

    On eclipse: Eclipse is slow, largely for the reasons stated above. Also something very popular in Java (and C#, sigh), is the whole encapsulation and "proper design" in OO. OO by it's design, is slow, lots more methods means lots more method calling and setting up the stack, registers is slow. It is obviously slower in a VM. This is seen not just in eclipse but in java everywhere (and C#/others). This philosophy is not as prevalent in c/c++ where "ugly code is good code". (I work in video games, I see my fare share of ugly, fast C++ code, thanks) The java community seems based on a best-of-breed approach where many frameworks do the same thing and in the end, one or two strongest survive and get to be used by everyone (hibernate, swing, struts, etc.) and magical enterprisey xml is in between everything to make it hold (a-la magical ducttape) and xml parsing is IO bound and slow.

    Eclipse mind you, does a number of things very well and I generally like it. Searching in large source code bases for methods/etc, it is very quick (much quicker than searching in VS in large C++ projects). I am also quite happy that they are in the process of starting a new version with a "fresh" code base free of all the slowness.

    I've also seen eclipse being unusable on some flavors of linux on high end desktops (1g ram, etc) because of the gtk native backend. Then again, if you run linux, i'm not sure why you'd want to use eclipse but oh well.

    Also, a number of tools from IBM run on top of eclipse. While I was working for IBM, we had this tool RAD (Rational application dev-something) which is like an enhanced version of eclipse built on top of it. Lots more plugins, lots of xml enterprisey stuff, lots of slowness. I remember mine on a 3.4ghz 2gb ram desktop taking over 5mins to LAUNCH. Not funny, I clocked it one morning while I went to grab a coffee. It'd use so much RAM that coming in in the morning, I'd find it almost entirely paged to disk if I left it running and just bringing the window back to a usable state of responsiveness would take even more time. Once loaded though, it was quite usable, again, thanks to heavy optimizations in the JVM and in the code (at the cost of memory...).

    On C#: Yeah, C# is as slow as Java. Main differance being that with C#, a service is launched on first app execution that is reused with other instances making their startup time much quicker (Java has/or is doing this, not sure but I know JEdit does something similar at least). Execution wise, C# may be slightly faster by the way the language implements generic at the VM level but I also believe it uses a bit more memory at runtime.

    On mobile apps: Java makes a decent choice, (as pointed before by some other users) mainly because of portability with little code modifications to run on many devices, NOT because of speed of execution. A lot of the JVM optimizations (compiling methods to native code, etc.) are memory intensive, something usually scarce on mobile devices so launch time and execution time is considerably slower (processor speed aside). C# would suffer the same fate on mobile if it ran (does it? no idea but I'm sure that if it does, it's not any faster)

    On software design: Most people are teached in school/work to make easily maintainable designs. This is OO/AOP design I'm talking about. By their very nature, they are not designed to execute fast, they are designed to be easily maintained and readable. OO slows down code if taken to extremes considerably with method invocation overhead and AOP is even slower (adds considerable overhead if not used properly or for wrong purposes).

    There is an other kind of design not often teached: design for speed. This is what most games on consoles/PC HAVE to use to maintain FPS. Data structure alignment matters more than you'd think and often, aligning data means that instead of storing 1000000 vectors of x,y,z you'll instead store 3 arrays of 1000000 values (x,y,z) just because cache hitting will be better thus reducing memory hits, prefetching, etc. This code will not be easily maintainable by other people or in the future, this is why working on a game with legacy code is a nightmare (those who are/have, I bow to your courage/patience).

    The former type of design was pushed heavily by Java proponents (and C#) especially because it matters a lot more in the corporate world where it doesn't matter if your CRM app is slow as hell when it has billion lines of codes you need to maintain everyday forever. (This is quite true, working at IBM we had to build a system interacting with a client's RPG system because they just couldn't get rid of it, it became too critical so we were building Java on top and extending in Java. You just know that in 20 years, some other language will have to interface with the java system that interfaces with the RPG system and you just know they will still have RPG/java developpers on staff. This is why COBOL will sadly never die and why you'll eb able to make a living with it forever)

    On the GC: You can't force the Java GC to run, and i'm pretty sure the same applies to C#. Where System.GC or it's equivalent is just a suggestion. As pointed out, the Java/C# GC implementation is very good at what it does and speed wise, generational garbage collecting is as good as it gets without using too much memory. The GC is not why the language is slow overall but CAN contribute to perceived slowness where you click on something, GC fires, you wait, GC terminates and your thing pops up, yeah, it can(and will) happen. It's no LISP GC but it does the job. You just don't appreciate enough memory being managed for you until you are forced to put a hardware breakpoint to see who writes and trashes your memory address in some C++ app, it's just not fun...

    These are the reasons why java is slower (in appearance and reality) depending on use/software/environment. Just stop bashing it, it's perfect (with C#) for it's intended use and it definately performs as designed (it was designed for portability, not speed and they did achieve their goal).

    Sorry for the lenghty post, i'm just tired of seeing people complain/argue against java without knowing wtf they are talking about. Please go on discussing the article, it isn't about java :)

    yeah i agree with some of this

  • zzp (unregistered) in reply to gabba
    Compare this to Google, which built a multi-billion dollar empire using cheap commodity hardware.

    So true ! And what is really sad is that even today, if you asked "how would you design the technical infrastructure of a company to compete with Google", most people would say they would buy expensive hardware, expensive support contract, etc because they think the only way to win is to be "on the technical bleeding edge".

    Most people will never understand that software is the key to pretty much everything: reliability, availability, speed, price, etc.

  • (cs) in reply to hallo.amt

    Sheesh. Java is slow. End of story.

    That fact doesn't make any of you guys bad developers, which is the tenor of the reactions I'm reading.

  • Maj najm (unregistered) in reply to GF
    GF:
    Anon:
    gabba:
    So now you can understand why Sun is sitting on a mountain of cash despite essentially having no product. Well, except for Java. Well, so really no product.
    Sadly, no. Most new non-Apple, non-Verizon cellphones contain a useless J2ME implementation, which you do pay Sun for.

    So just like people complain about the "Microsoft tax" when buying new PCs, new cellphones get dinged the "Sun tax" to allow you to run crappy mini-Java applications that no one in their right mind would ever use.

    Imagine the speed of a Java desktop application, shrunk down and running on a cellphone...

    Welcome to the 2000s. Have you even tried any java apps in the last five years, or are you just running off at the mouth based on a bad experience from a decade ago? All blackberry apps are Java (including the google maps implementation which gives real-time GPS-based positioning). The only performance issues I ever see are in poorly coded specific applications. As for the desktop - take a look at Netbeans, or Eclipse -- tools that are unmatched for capability, written in Java, with no discernable speed difference from native .

    honestly, I wouldnt use eclipse as an example of a fast program, since pretty much every other IDE I've used is blazingly fast in comparison. ;)

  • Maj najm (unregistered) in reply to Anon
    Anon:
    aaawww:
    Anon:
    Imagine the speed of a Java desktop application, shrunk down and running on a cellphone...

    well, me thinks that some while ago the myth of slowness of java desktop applications was debunked...

    otho, i like to play the midp dweller roguelike

    When's the last time you used a Java desktop application? I use one daily, it's based on Eclipse, so any of the "it's just Swing" arguments can be chucked out the window because Eclipse uses SWT which actually uses native widgets.

    It's the slowest freaking thing I've ever used and it's even more hungry for memory than Firefox loading an AJAX web application. Once it finally gets loaded and running, it's fast enough for typing text.

    But every couple of minutes - FREEZE! It just stops. Best guess is that this is the Java garbage collector freezing the entire application for 10 seconds.

    Whenever it needs to load something (for example, to autocomplete some text) - FREEZE! The entire application stops for 10-20 seconds.

    Try and do anything more complicated than text editing, and you're in for even more slowdowns.

    So, no, Java being slow on the desktop is NOT A MYTH. If you've ever used a Java desktop application recently, you'd know that.

    I've played games written in java that ran comparably to native games. If you feel like it, check out the jMonkey engine. ;) Eclipse is just a monster of bad design.

  • Maj najm (unregistered) in reply to Jimjim
    Jimjim:
    aerosgsrgi:
    Who still uses 512MB of RAM?

    PS3 only has 512...

    And game devs are kind of iffy with the low amount of ram available on this gen of consoles.

  • Maj najm (unregistered) in reply to ThatGuy
    ThatGuy:
    You just don't appreciate enough memory being managed for you until you are forced to put a hardware breakpoint to see who writes and trashes your memory address in some C++ app, it's just not fun...

    Urgh. I work at a place with a system (yep) with a fwe hundred thousand lines of coe (once class is a ctually 27k lines on its own, with several methods clocking on on several thousand lines). It is split up in different components (which are really different programs altogether) chatting with eachother with an underlying layer. Its all in C++. And, while working on regression tests, I started getting pointer errors causing core dumps on some of the components. Yeayy!! Is the pointer deleted somewhere and then read? Is is being written over by something that it shouldnt and IF so, which one of the 30 or so components running? And where in the component?

    Fun times. ;) I take working in game code over that pretty much any day. At least you can usually sift through the code of a game and understand most of the high level workings in a few days. ;) (the ugly hacks might take a bit of time each though heh) and yeah. Im very familiar with game engines and ugly hacks therein.

  • Helix (unregistered) in reply to Maj najm
    Maj najm:
    Anon:
    aaawww:
    Anon:
    Imagine the speed of a Java desktop application, shrunk down and running on a cellphone...

    well, me thinks that some while ago the myth of slowness of java desktop applications was debunked...

    otho, i like to play the midp dweller roguelike

    When's the last time you used a Java desktop application? I use one daily, it's based on Eclipse, so any of the "it's just Swing" arguments can be chucked out the window because Eclipse uses SWT which actually uses native widgets.

    It's the slowest freaking thing I've ever used and it's even more hungry for memory than Firefox loading an AJAX web application. Once it finally gets loaded and running, it's fast enough for typing text.

    But every couple of minutes - FREEZE! It just stops. Best guess is that this is the Java garbage collector freezing the entire application for 10 seconds.

    Whenever it needs to load something (for example, to autocomplete some text) - FREEZE! The entire application stops for 10-20 seconds.

    Try and do anything more complicated than text editing, and you're in for even more slowdowns.

    So, no, Java being slow on the desktop is NOT A MYTH. If you've ever used a Java desktop application recently, you'd know that.

    I've played games written in java that ran comparably to native games. If you feel like it, check out the jMonkey engine. ;) Eclipse is just a monster of bad design.

    True

  • Bosshog (unregistered) in reply to RH
    RH:
    yEAH rIGHT:
    ...and if you go to www.e10k.net, you can buy one of them at kentucky steakhouse !

    Probably using it to charbroil the steaks.

    Ho ho ho! Well done sir.

  • Andrew (unregistered)

    What kind of a fool would spend that much?

    Jesus.

  • NeoMojo (unregistered) in reply to Jimjim
    Jimjim:
    Kind-hearted... It's a useful social skill to learn !
    Kind hearted? On this website? This is a site created explicitly to deride others. Looking for a kind heart here is like looking for an honest politician.
    Andrew:
    What kind of a fool would spend that much? Jesus.
    Interesting. What did he spend it on?
  • 543 (unregistered)

    As for the Java slowness:

    Well, maybe you don't see big difference in response when using Eclipse, but it surely is using more resources - try running it on notebook on battery (underclocked processor - slower response && more CPU usage - less battery lifetime).

    Also, try running something from IBM built on Eclipse platform - like Data Modeller and so... Slow, slow, crash, slow, slow, crash, crash... Even the Installation Manager for the application is SLOW.

    And I've got no 486, its Core Duo 1.83 GHz, 2 GB RAM and fast disk drive. Not today high-end for running games like Crysis, but it should be enough for drawing boxes (that IBM software) or text editor with code features. Also Visual Studio 2008 runs jet-speed (except the MSDN Library :) ) on this hardware.

    On the other hand - Opera Mini written in J2ME runs good even on very old mobile phone.

    Captcha: eros :P

  • (cs) in reply to Edward Royce
    Edward Royce:
    RH:
    yEAH rIGHT:
    ...and if you go to www.e10k.net, you can buy one of them at kentucky steakhouse !

    Probably using it to charbroil the steaks.

    Hmmmmm.

    You know. I'd make it a point to visit a steakhouse that did that!

    Now that would be pretty bloody cool.

    Hmmm... Bloody and cool. Nope - that's rare, and the e10K runs too hot to do anything under well done.

  • Farmer Brown (unregistered)

    Umm, don't put all your eggs in one basket?

  • Jay Hughe (unregistered) in reply to Anon

    I have a core 2 duo with 1Gig and both my Netbeans 6 and Eclipse run faster than VS2008 and SQL Server 2005... Did I just say my java is faster than .net...

  • YourNameHere (unregistered) in reply to Anon

    Actually, set-top boxes in the US have been rolling out with Java for about a year now, and according to my bosses ( I do set-top development) the industry is going for more in the future.

  • (cs)

    Is TRWTF that the submitter's contracting company did not demand in the contract that a compensatory payment be made if the client unilaterally decided to scrap the project, or is it that the company received a payment but didn't pass any of it along to the now-unemployed contractors?

  • (cs) in reply to hallo.amt

    [quote user="hallo.amt"][quote user="eryn"] the GC doesn't do anything while it detects user activity in Java... you can't even force it to collect, unlike in the .NET framework where you can. That's a reason why some apps have such big memory footprints, they wait for a lull in activity before they cleanup.

    I've seen/worked with/written/laughed at some hideously slow .NET applications, you don't see me blaming the Framework.

    ...perhaps it has some quintiple nested loop operations with hundreds of String concatentation operations.[/quote]

    Ever heard of System.gc()? That should do the trick./quote] The API doc of System.gc() is misleading. The general agreement among people who know the internals of recent JREs is that it's merely a suggestion to the JRE that now would be a good time to do GC work, and the JRE may or may not follow that suggestion.

  • (cs) in reply to Azeroth
    Azeroth:
    You can't expect well optimized natively-compiled system run slower than one depending on some cross-platform framework/pseudo-compiler. It's against the laws of physics. About the same speed is the max you can hope for.
    Wrong. "Native" compilation nearly always involves a lot of "least common denominator" in regard to the CPU because it needs to run on a wide variety of CPUs. Java code in a modern JRE, on the other hand, when it is compiled just-in-time, can be fully optimized for the actually present CPU. Obviously, this is paid for by rather huge startup overhead that may never be recouped - possibly a reason why Java's biggest success is on the server, where startup overhead is easily recouped and largely irrelevant.
  • Arancaytar (unregistered) in reply to gabba
    gabba:
    Compare this to Google, which built a multi-billion dollar empire using cheap commodity hardware.

    So now you can understand why Sun is sitting on a mountain of cash despite essentially having no product. Well, except for Java. Well, so really no product.

    I'm a Java programmer you insensitive clod!

  • (cs) in reply to ThatGuy
    ThatGuy:
    On Java: lol. I've used java for years, on desktop and mobile. On windows and linux. It is slow. That's it, end of discussion. Compared to native, you can't compare, obviously. With native, you double click/execute, your code just runs. It executes right away. Bingo! With Java? JVM loads, classes are loaded
    That's a rather narrow definition of "slow", one that almost seems specifically chosen to be biased against Java.
  • RCH (unregistered) in reply to Justice
    Justice:
    captcha: letatio - sounds vaguely dirty.

    It sounds Irish.

  • (cs) in reply to Anon
    Anon:
    Exactly how big of a user load will one of those babies handle? And exactly how many staff did they expect to have using it such that they needed their own fully decked out server?
    Well, every single damn credit card transaction in the whole wide world, in fact. And the back-office consolidation too. Not to mention any fraud detection system you might want to put in there. (Just don't use the JVM for any of it.)

    Unless you've put some thought into the architecture, then, no, you're right. This is an absurd purchasing decision. Based on my own experience, I would suggest that bringing Sun and IBM on board at the beginning of the process, rather than at the point where you choose your hardware configuration, is ahem TRWTF.

  • (cs) in reply to brazzy
    brazzy:
    Azeroth:
    You can't expect well optimized natively-compiled system run slower than one depending on some cross-platform framework/pseudo-compiler. It's against the laws of physics. About the same speed is the max you can hope for.
    Wrong. "Native" compilation nearly always involves a lot of "least common denominator" in regard to the CPU because it needs to run on a wide variety of CPUs. Java code in a modern JRE, on the other hand, when it is compiled just-in-time, can be fully optimized for the actually present CPU. Obviously, this is paid for by rather huge startup overhead that may never be recouped - possibly a reason why Java's biggest success is on the server, where startup overhead is easily recouped and largely irrelevant.
    I'd quibble about the reason for Java's biggest success. For me, it sucks big time on a server, because that's exactly where you want to optimise performance (and let's forget start-up). Java doesn't really give you too many options in that regard. OTOH, it's a superb marketing tool, replete with a jug-full of acronyms and frameworks, and accessible to PHBs because "gawrsh, it's still cool," and moron programmers because "the garbage collector will clean up after me" (no it won't).

    Your definition of "Native" compilation is interesting. It involves tomahawks, war paint, and ululation, possibly? Here's a challenge: define me a task or an algorithm, and specify any platform you want. I'm pretty certain that I could write a C++ program that would out-perform your Java program by at least a factor of two (speed) over ten thousand cycles or so, and it would most certainly have a smaller memory footprint (not to mention caches or anything).

    Both of them suck at threading, though.

  • BillyBobJoe (unregistered) in reply to Anon
    Anon:
    Exactly how big of a user load will one of those babies handle? And exactly how many staff did they expect to have using it such that they needed their own fully decked out server?

    It depends on the software configuration.

    If you are running J2EE with EJB, about 20 users.

    Apache and mod_perl, maybe 50,000.

    So we recommend J2EE with EJB, says the saleman in the Armani suit.

  • woohoo (unregistered) in reply to Anon
    Anon:
    Volmarias:
    Guess what, I use eclipse too. And I had the same freezing issue. The problem? Swap issues would cause eclipse to do a LOT of paging. Someone wrote a workaround for it, but upgrading to more than 512MB did the trick too. Once that happened, I never had a slowdown with eclipse.

    Actually, if you're having a 20 second slowdown for autocomplete, you're either running on a P3, or you're using waaaay too many libraries for your own good.

    You're right, I shouldn't expect 1GB of memory on a Core 2 Duo machine to be able to run Eclipse at a satisfactory speed. I suppose I should upgrade to a Core 2 Quad with 8GB of RAM to use an IDE.

    C'mon. I sometimes use Eclipse on a notebook with 1 GB and 1.7 GHz (and using speed scaling when running on battery) and it works like a charm. Check your setup.

    Wait... perhaps it's because I'm using Linux as the underlying OS? ;o)

    You see, Linux is also often deemed "crappy" by Windows users, who - if you look/ask more closely - never even have seen a decent Linux implememtation, let alone having tried or used one.

    And the very same holds true for most of the "Java-is-so-slow" moaners ;o)

  • (cs) in reply to gabba

    I just finished loading a 2 TB database on a Sun product on a 4 day consulting gig. The sweetest part of the gig was the Sun Hardware (which is quite real). I had to restart the load due to Oracle bugs, but it didn't really matter ("I'll start the load of the 5 billion row table before we leave tonight. It should be done when we get in tomorrow.")

    How come I can't get a Sun box to run my databases on?

  • (cs) in reply to real_aardvark
    real_aardvark:
    I'd quibble about the reason for Java's biggest success. For me, it sucks big time on a server, because that's exactly where you want to optimise performance (and let's forget start-up). Java doesn't really give you too many options in that regard.
    Quite a few, actually: http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

    And let's face it: the server is exactly where you often do NOT need to optimize performance to the last cycle, because for a custom app (which a large percentage of server apps are) throwing more hardware at it is usually a cheaper option than having a developer micro-optimize your code.

    OTOH, it's a superb marketing tool, replete with a jug-full of acronyms and frameworks, and accessible to PHBs because "gawrsh, it's still cool," and moron programmers because "the garbage collector will clean up after me" (no it won't).
    Whereas C++ is accessible to the cowboy coders who exclaim "you'll take my manual memory management from my cold, dead fingers", just as they implement another buffer overrun?

    Let's leave the FUD out of this.

    Your definition of "Native" compilation is interesting. It involves tomahawks, war paint, and ululation, possibly?
    Har de har har.

    What percentage of applications do you think are run on a CPU for which they were specifically compiled, using all possible optimizations? I have no idea, but I'd bet good money that it's fewer than 0.01%.

    I assumed that by "natively compiled", Azeroth really meant "compiled directly to machine code", and I did not claim that Java code is always faster than that, just that it is in fact possible.

    Here's a challenge: define me a task or an algorithm, and specify any platform you want. I'm pretty certain that I could write a C++ program that would out-perform your Java program by at least a factor of two (speed) over ten thousand cycles or so, and it would most certainly have a smaller memory footprint (not to mention caches or anything).
    How about these: http://www.osnews.com/story/5602

    Or these: http://pages.cs.wisc.edu/~plakal/javatraces/benchmarks.html

    I just tried the Quicksort.

    C++ version compiled with Borland C++ 5.5: bash-3.00$ QSort 10000000 startup time: 0.578 sort time: 2.297

    Java version run on JDK 1.6.0_04: bash-3.00$ java -server QSort 10000000 startup time: 0.219 sort time: 1.86

    I'm curious.

  • Anon (unregistered) in reply to brazzy
    brazzy:
    I just tried the Quicksort.

    C++ version compiled with Borland C++ 5.5: bash-3.00$ QSort 10000000 startup time: 0.578 sort time: 2.297

    Java version run on JDK 1.6.0_04: bash-3.00$ java -server QSort 10000000 startup time: 0.219 sort time: 1.86

    I'm curious.

    What optimization settings where used for the C++ version? Where debug libraries used?

    And, the biggest one, if you're using bash, why not use the time command to get the program times? Why let the program report the time?

    My guess is because Java's true startup time and library load time would bloat the faked test time to make it lose to a C++ program.

    Plus you have to do some form of cheating to be able to skip the penalty of JIT compilation. Otherwise there's no way interpreted code would be as fast as native code.

  • woohoo (unregistered) in reply to Maj najm
    Maj najm:
    Urgh. I work at a place with a system (yep) with a fwe hundred thousand lines of coe (once class is a ctually 27k lines on its own, with several methods clocking on on several thousand lines). It is split up in different components (which are really different programs altogether) chatting with eachother with an underlying layer. Its all in C++.

    Urgh indeed... but here obviously many (if not all) principles of OO design have been violated.

    No class has 27k lines (and certainly no method several 1000 lines, at that!) if an OO system and its components are modelled correctly from the beginning.

    I'd not be surprised if this was some "multi-purpose-does-all" class which in fact should be split up into multiple classes or even modules...

  • Anon (unregistered)

    I'm surprised no-one here has mentioned IntelliJ yet (or if they did I scrolled past it). It's the only Java IDE that I'm willing to use, for performance and usability reasons, and because it has some very powerful refactoring and code analysis abilities. IntelliJ is written in Java (using Swing for the UI, no less!) and it looks and feels almost like a native app, whether you're running on Windows, OS X, or Linux. There's a small amount of native code to do things like watch the filesystem for any changes you made outside the IDE. It even has a part of the status bar showing exactly how much Java heap you are using, with a trashcan icon to force a GC if you feel so inclined. Generally you don't need more than the default max Java heap which they set at 192MB, but it's easy to bump this up if you need/desire.

    IntelliJ does cost $$$, but it's worth every penny IMHO (even more so if you can get your company to pay for it!). I highly recommend downloading the 30-day trial if you are sick of your current IDE. At any rate, it's a perfect counterexample to show that Java apps on the desktop are not inherently slow. Azureus is another example that's already been mentioned, and also Frostwire.

    As for phones, my company designed the software for a popular Java-based smartphone, and without getting into anything proprietary, I can say that Java is generally a good thing for anything that's not performance critical, primarily because bugs in the code will 99% of the time turn into exceptions that you can catch in log output during development, rather than memory corruption and crashes. You still have to deal with race conditions and other multithreaded complexity, but Java is easier to work with than C/C++ here as well. In a previous life I wrote some apps for Nokia Series 60 (very weird flavor of C++ with proprietary classes for exception handling) and I much prefer Java.

    You do have to pay Sun for the right to use the Java logo, and to license the TCK's (unit tests) to verify that you are compatible with the API's and JSR's that you have implemented, even if you didn't license any Sun code for your implementation. So there is a bit of a "Sun tax" but it's no different from paying for the right to use the Bluetooth or Wi-Fi logos, for example.

  • That-OTHER-Guy (unregistered) in reply to ThatGuy
    ThatGuy:
    On Java: lol. I've used java for years, on desktop and mobile. On windows and linux. It is slow. That's it, end of discussion. Compared to native, you can't compare, obviously.
    Overgeneralizing rubbish. It very much depends on use, environment - and of course your definition of "slow" ;o)
    ThatGuy:
    With native, you double click/execute, your code just runs. It executes right away. Bingo! With Java? JVM loads, classes are loaded (JAVA in it's brilliant design, has classes littered over the file system if not bundled in jar files, C# grately improved on this by forcing things to compile not to individual classes but into libraries (dlls) speeding load time considerably).
    Yes, of course. That's easy for a language that only runs on one OS... Why we need a VM for that in the first place is an entirely different question. Why anyone who knows what he is doing should litter the classes all over the file is another.
    ThatGuy:
    The IO is by far the slowest operation your CPU does because it has to wait, a CPU waiting is a CPU not executing code from your app (multithreading is not helping loading java classes as it's IO bound). Once all this is done, your code executes. This is fairly fast obviously, as benchmarks show, Sun did a decent job over the years to optimize the JVM. The initial cost of starting the JVM and launching the app is why java is so slow in small apps. This is also why it is largely slower on mobile that run from flash and have flash memory. Java also tends to use memory a lot (eclipse, netbeans, etc.) and with more memory used, the more your system is going to page, windows also likes to page applications that you minimize to the task bar. Again, more IO which slows things more. This is something all applications suffer with but the more memory they use, the more apparent it will be (I see this with firefox everyday, sigh). Also, on mobile, I suspect the jvm (and it's knock offs) do not have the heavy optimization the desktop JVM has, again adding to the java is slow thing.
    I find that most mobile devices tend to be much slower than desktops (quite understandably), no matter if the application is written in JME or natively. Why do you blame this on Java alone?
    ThatGuy:
    On eclipse: Eclipse is slow, largely for the reasons stated above. Also something very popular in Java (and C#, sigh), is the whole encapsulation and "proper design" in OO. OO by it's design, is slow, lots more methods means lots more method calling and setting up the stack, registers is slow.
    So "proper design" means pushing registers in ASM or pulling low-level tricks in C? What kind of programs are you writing? If you write 3D games for PCs then *perhaps* your point might still be valid.

    You are aware, however, that for large server side systems the use of a strongly typed (and perhaps OO) language is the only viable option? You can not give up "proper design" for speed in that case, otherwise all you will produce is a maintenance nightmare.

    Also, large distributed systems are not dependent on "raw CPU speed", the overall performance depends on many factors, and they have to scale well, which they often won't if they are "optimized" by low-level tricks for a certain platform and/or CPU architecture.

    ThatGuy:
    It is obviously slower in a VM. This is seen not just in eclipse but in java everywhere (and C#/others). This philosophy is not as prevalent in c/c++ where "ugly code is good code". (I work in video games, I see my fare share of ugly, fast C++ code, thanks)
    And this "ugly and fast" is good?
    ThatGuy:
    The java community seems based on a best-of-breed approach where many frameworks do the same thing and in the end, one or two strongest survive and get to be used by everyone (hibernate, swing, struts, etc.)
    And this is bad how?
    ThatGuy:
    and magical enterprisey xml is in between everything to make it hold (a-la magical ducttape) and xml parsing is IO bound and slow.
    I beg your pardon? Apart from XML based communication protocols (SOAP et al.) all the "magical enterprisey xml" in these frameworks is used for configuration and thus only parsed once at start-up, which renders the XML parsing speed irrelevant. The start-up phase of a complex service is always bound to be slower than the execution phase, no matter which language it is written in, and services are not restarted frequently (at least if they are run on a decent OS (!) and are written and configured correctly!)
    ThatGuy:
    Eclipse mind you, does a number of things very well and I generally like it. Searching in large source code bases for methods/etc, it is very quick (much quicker than searching in VS in large C++ projects). I am also quite happy that they are in the process of starting a new version with a "fresh" code base free of all the slowness.

    I've also seen eclipse being unusable on some flavors of linux on high end desktops (1g ram, etc) because of the gtk native backend.

    What? I'm running Eclipse on a relatively old Notebook (1GB, 1.7 GHz, Linux OS) and it runs smoothly. (1 GB is not high end nowadays, BTW...) The other services like appserver, database etc. are running on the same machine simultanously while developing without problems. Out of curiosity I tried this on the same hardware with XP, but this was no good idea ;o)
    ThatGuy:
    Then again, if you run linux, i'm not sure why you'd want to use eclipse but oh well.
    I beg your pardon? I'm not sure what you are trying to say here...
    ThatGuy:
    Also, a number of tools from IBM run on top of eclipse. While I was working for IBM, we had this tool RAD (Rational application dev-something) which is like an enhanced version of eclipse built on top of it. Lots more plugins, lots of xml enterprisey stuff, lots of slowness. I remember mine on a 3.4ghz 2gb ram desktop taking over 5mins to LAUNCH. Not funny, I clocked it one morning while I went to grab a coffee. It'd use so much RAM that coming in in the morning, I'd find it almost entirely paged to disk if I left it running and just bringing the window back to a usable state of responsiveness would take even more time. Once loaded though, it was quite usable, again, thanks to heavy optimizations in the JVM and in the code (at the cost of memory...).
    This might also have been due to the OS used (its caching/paging strategies, memory management, task scheduling etc.) and of course on the RAD tool itself - only because it was made by IBM does not mean that it must have been written well.
    ThatGuy:
    On C#: Yeah, C# is as slow as Java. Main differance being that with C#, a service is launched on first app execution that is reused with other instances making their startup time much quicker (Java has/or is doing this, not sure but I know JEdit does something similar at least). Execution wise, C# may be slightly faster by the way the language implements generic at the VM level but I also believe it uses a bit more memory at runtime.

    On mobile apps: Java makes a decent choice, (as pointed before by some other users) mainly because of portability with little code modifications to run on many devices, NOT because of speed of execution. A lot of the JVM optimizations (compiling methods to native code, etc.) are memory intensive, something usually scarce on mobile devices so launch time and execution time is considerably slower (processor speed aside). C# would suffer the same fate on mobile if it ran (does it? no idea but I'm sure that if it does, it's not any faster)

    On software design: Most people are teached in school/work to make easily maintainable designs.

    I wished that was only remotely true... if it was, we wouldn't see this plethora of crappy and unmaintainable lumps of software that plagues most businesses.
    ThatGuy:
    This is OO/AOP design I'm talking about. By their very nature, they are not designed to execute fast, they are designed to be easily maintained and readable.
    The first (speed) is simply not true and the latter (maintainance) is a good thing too. Only that it is unfortunately not done properly very often...
    ThatGuy:
    OO slows down code if taken to extremes considerably with method invocation overhead and AOP is even slower (adds considerable overhead if not used properly or for wrong purposes).
    Each programming technique can be slow when not used properly or for the wrong purpose. You can *not* blame this on paradigms like OO or AOP.
    ThatGuy:
    There is an other kind of design not often teached: design for speed. This is what most games on consoles/PC HAVE to use to maintain FPS.
    I have seen games implemented in Java which had the same FPS as native ones. And I've seen many "optimizations" backfire in unexpected and desastrous ways...
    ThatGuy:
    Data structure alignment matters more than you'd think and often, aligning data means that instead of storing 1000000 vectors of x,y,z you'll instead store 3 arrays of 1000000 values (x,y,z) just because cache hitting will be better thus reducing memory hits, prefetching, etc. This code will not be easily maintainable by other people or in the future, this is why working on a game with legacy code is a nightmare (those who are/have, I bow to your courage/patience).
    At least you are acknowledging the problems here for the first time. Good.
    ThatGuy:
    The former type of design was pushed heavily by Java proponents (and C#) especially because it matters a lot more in the corporate world where it doesn't matter if your CRM app is slow as hell when it has billion lines of codes you need to maintain everyday forever.
    I'm sorry, but the one thing does not have to do with the other in the slightest. You can have well-written, easily maintainable apps which are still fast and you can have maintainance nightmares which are CPU and memory hogs (unfortunately the latter is much more prevalent...) It mostly only depends on the skills of the development teams.
    ThatGuy:
    (This is quite true, working at IBM we had to build a system interacting with a client's RPG system because they just couldn't get rid of it, it became too critical so we were building Java on top and extending in Java. You just know that in 20 years, some other language will have to interface with the java system that interfaces with the RPG system and you just know they will still have RPG/java developpers on staff. This is why COBOL will sadly never die and why you'll eb able to make a living with it forever)

    On the GC: You can't force the Java GC to run, and i'm pretty sure the same applies to C#. Where System.GC or it's equivalent is just a suggestion.

    And that's a good thing too. The heuristics used to judge the necessity of a GC run are much better than nearly all developers' aptitude to handle this themselves. It is the same as "hand tweaking" programm code: quite often this will just backfire and make matters worse, because you have to know damn well what you are doing. The same is true for memory management: It is not to say that it's not *possible* to write explicit memory management code which is much more efficient than any GC - but only *very* few people are capable of this. I'd go with an implicit approach at any time for the average IT project - it is simply not possible to have enough "gurus" on the team to avoid all the common pitfalls. The prevalence of memory leaks in so many programs/systems bears witness to this fact.
    ThatGuy:
    As pointed out, the Java/C# GC implementation is very good at what it does and speed wise, generational garbage collecting is as good as it gets without using too much memory. The GC is not why the language is slow overall but CAN contribute to perceived slowness where you click on something, GC fires, you wait, GC terminates and your thing pops up, yeah, it can(and will) happen. It's no LISP GC but it does the job. You just don't appreciate enough memory being managed for you until you are forced to put a hardware breakpoint to see who writes and trashes your memory address in some C++ app, it's just not fun...

    These are the reasons why java is slower (in appearance and reality) depending on use/software/environment. Just stop bashing it, it's perfect (with C#) for it's intended use and it definately performs as designed (it was designed for portability, not speed and they did achieve their goal).

    Now I'm nearly forgiving most of your statements above ;o) because this is quite a sensible way to see these languages - only that the generalization about performance is simply not true. Thus some of your statements had to be retorted, no offence meant :o)

Leave a comment on “Out of Balance”

Log In or post as a guest

Replying to comment #:

« Return to Article