Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Java Programming Software

Java Vs. C#: Which Performs Better In the 'Real World'? 437

Nerval's Lobster writes "Software developer Jeff Cogswell writes: 'Let's compare Java and C#, two programming languages with large numbers of ardent fans and equally virulent detractors. I'm not interested in yet another test that grindingly calculates a million digits' worth of Pi. I want to know about real-world performance: How does each language measure up when asked to dish out millions of Web pages a day? How do they compare when having to grab data from a database to construct those pages dynamically? The results were quite interesting.' Having worked as a professional C# programmer for many years, Cogswell found some long-held assumptions challenged."
This discussion has been archived. No new comments can be posted.

Java Vs. C#: Which Performs Better In the 'Real World'?

Comments Filter:
  • by InterBigs ( 780612 ) on Thursday January 17, 2013 @10:08AM (#42616419)
    When talking about large-scale websites the language is hardly relevent. There are as many high-traffic sites running on C#, Java, PHP or whatever. When facing large scale other factors play a much larger role. The only exception is when you're talking Facebook or Twitter scale: Facebook has practically reinvented PHP and also has some parts of their code in C (or C++, not sure) and Twitter made a switch from Ruby to Scala in order to handle the onslaught of users. The results mentioned in the article (accepting 2000 requests takes 600ms longer when using simple code) are not that interesting in this context.
    • by QBasicer ( 781745 ) on Thursday January 17, 2013 @10:18AM (#42616537) Homepage Journal
      This is more a comparison between runtimes and servers, and less about language.

      The reason this is interesting, is it's a very simple test, and hows the maximum performance. Requests can never be faster than returning a simple string. CLR + ISS is slower than JVM + Tomcat. Unfortunately, we don't know where exactly the performance difference lies.
      • by samkass ( 174571 ) on Thursday January 17, 2013 @10:30AM (#42616677) Homepage Journal

        It's also interesting to note that all tests were done on Windows. Despite him using Tomcat for Java and IIS for C# because that's the "typical" usage, he then completely does an about-face and deploys the Tomcat on Windows-- a configuration I've actually never seen and which has to give C# a bit of an advantage as the vendor-supplied OS. And yet Java still won when talking about doing anything substantial...

        • I also add the tests were run on cloud servers, which is a time share environment.

          Also, I would have used TC server instead of tomcat. Or another java enterprise JSP container.

        • Comment removed (Score:5, Insightful)

          by account_deleted ( 4530225 ) on Thursday January 17, 2013 @10:44AM (#42616843)
          Comment removed based on user account deletion
          • by darjen ( 879890 ) on Thursday January 17, 2013 @10:53AM (#42616973)

            I been a Java developer for 8 years, worked at several different consulting companies and large in-house corporate environments. I've never seen Windows+Tomcat being used in an actual production setup. For development, yes, almost always. But Linux+Tomcat is much more common for live servers in my experience. At least it is in today's business world.

            • by TyIzaeL ( 1203354 ) on Thursday January 17, 2013 @11:09AM (#42617163)
              You must not work in the education sector. PowerSchool [pearsonschoolsystems.com] is becoming quite popular in many districts (at least where I live) these days and Windows and Mac are all they support. They most commonly set up Tomcat + Oracle on Windows servers.
              • by Anonymous Coward on Thursday January 17, 2013 @11:29AM (#42617405)
                Yay PowerSchool. For over a year, they didn't even support sFTP. Most of their customers transferred student data over the Internet with no VPN using FTP. Should have seen all the SSN, name, and address data for both students and teachers that was transferred. Not to mention their data is messy.
            • by Anonymous Coward on Thursday January 17, 2013 @11:10AM (#42617177)

              Dueling useless anecdotes.

            • by Anonymous Coward on Thursday January 17, 2013 @11:43AM (#42617549)

              I've been doing Java development for 15+ years and most of that in web apps. Production deployments to Linux, mainframes, and Windows. Sadly, most often, the production machines are Windows. A typical argument is that it is best to have the production system similar to development (and QA, and integration testing, and user acceptance testing) system to avoid surprises as the build travels through the process.

              Concerning portability of Java across platforms, I can only recall having three issues and they are all related to file systems: paths (developer assumption), permissions, and Windows misreporting file creation time. For Java web apps, your portability issues are the same regardless of language--the browsers.

              For a true comparison of Java to C#, I can only think of one way to do it. Give four weeks of identical requirements to two teams, one of C# fanbois and one of Java fanbois. Limit them to three development weeks each, and then judge by features completed and application performance. Switch teams and complete the job. Try a larger project to flush out the architecture set up phase and then adjust your results by availability of skilled resources in the market.

            • by Anonymous Coward on Thursday January 17, 2013 @12:38PM (#42618113)

              > I've never seen Windows+Tomcat being used in an actual production setup.

              Then you haven't seen shit.

            • Symantec Endpoint Management uses Tomcat / Java / Windows, as does CrashPlan, Blackberry Enterprise, and probably scores of others. It seems like any time Im dealing with an "enterprisey" service that has some kind of "shiney" web interface, its got tomcat on the backend.

              For the record, BES has been tomcat basically forever.

            • VMWare vCenter is a tomcat application and the installer only works on Windows. Thats one example. There are other COTS applications out there that use tomcat for a backend on windows. While you personally may not do it others have done it. I agree with you that Linux and Tomcat is the most common configuration though.
          • I've seen Tomcat on Windows a lot. Remember that most Enterprise environments until relatively recently used Windows for everything.

            As far as I can remember (at least since 1998) I've almost never seen a Java/Windows-based web-application enterprise environment. I've only seen that twice, and these were for subsets of web apps that were meant to run on laptops that would temporarily be on the field, disconnected from a network.

            And before the advent of Java, most enterprise systems were running on a combination of mainframes and minicomputers (the good but now almost forgotten AS400s and their like), and the old UNIX workstations. Win

        • by red_dragon ( 1761 ) on Thursday January 17, 2013 @11:00AM (#42617061) Homepage

          ... he then completely does an about-face and deploys the Tomcat on Windows-- a configuration I've actually never seen and which has to give C# a bit of an advantage...

          The official Tomcat installer for Windows (as in, the one that you'd download from tomcat.apache.org [apache.org] installs the Tomcat Native Connector, which improves performance considerably. And there's a lot of vertical market applications for Windows that bundle Tomcat.

        • by PickyH3D ( 680158 ) on Thursday January 17, 2013 @03:01PM (#42619681)

          In the first test, he explicitly mentions going back on his word to use a Linux machine.

          Because of this discrepancy, I feel compelled to try out the Java version on a Linux server. The server used is a “c1.medium” on Amazon EC2. I install the two different Java classes and see essentially the same speeds. The HttpServer class takes about 14 seconds to process 15 requests. Not very good.
          slashdot (http://s.tt/1yA3K)

          The author is clearly not a Java developer, and the second test really calls the first test into question. In the first test, he is having trouble with socket connections, which proved devastating to Java's numbers. Then, he moved onto using ASP.NET versus JSP in the second test, and JSP did significantly better than his simple socket tests in Java.

          The simple fact that he did not go back to figure out what was wrong with his first test demonstrates quite clearly that both sets of his results are useless. It should be obvious that he is a weak Java developer--even without seeing the code--and I suspect he is not a particularly strong C# developer either on the basis that he did not question the results.

      • by Anonymous Coward on Thursday January 17, 2013 @10:48AM (#42616909)

        The reason this is interesting, is it's a very simple test, and hows the maximum performance. Requests can never be faster than returning a simple string. CLR + ISS is slower than JVM + Tomcat. Unfortunately, we don't know where exactly the performance difference lies.

        Nope, maybe that's what author think's he's doing, but he clearly doesn't understand the stacks.

        For .NET, he's using the entire ASP.NET MVC framework to return a simple string. For Java, he's just using a bare servlet, and no framework code. To make this a fair test, he should be using Spring or something on the Java side.

        • Oh wow. then he should have used a JSF 2.0 implementation. On top of Tomcat...good luck with that.

          Clueless test is clueless. Comparing Apple to Al Quaida to give management advice to system architects..
          Technology most commonly is used by what the corporate standard is.
          If there isn't one then you choose what your devs are most familiar with.
          If you aren't fettered by considerations as these then you choose the plattform with the least cost attached to. Which bloody well isn't anything .NET.
          Oracle had th
          • I will have to disagree with the "cost" of .Net over say Java. In context, if you are talking ANY_LANGUAGE + ORACLE, the cost isn't a concern. If It's Java + Oracle vs. .Net + MS-SQL, I would advise that the cost is probably lower in the .Net case. Another issue is time, every time I have worked in a Java project, I feel like I'm pulling teeth just to get the environment setup... Eclipse + Tomcat + project + nant tasks + debug ... vs VS + solution/project + debug ... Add to that most of the applications
            • by cfulton ( 543949 ) on Thursday January 17, 2013 @01:53PM (#42618953)
              Just an FYI. There is nothing that prevents running Java + MS-SQL. It is a common back end stack and is used for all web applications at my current employer. It works very well. KISS is a good strategy and should be employed in any project. However, part of that strategy is to keep dependencies low across the project hence interfaces. Part of that strategy is to find bugs prior to integration hence unit testing. I have worked with Java for a long time and if you are conversant with it the "Eclipse + Tomcat + project + nant tasks + debug" setup doesn't take any longer than the "VS + solution/project + debug" setup. I think it is more of a matter of taste than anything.
      • by ByOhTek ( 1181381 ) on Thursday January 17, 2013 @12:49PM (#42618253) Journal

        Overall, I'd say the test showed that the author doesn't know how to benchmark.

        IIS sucks pure and simple. Even on Windows I use Apache. It's just better.

        But I also noticed, he spent a lot of time and effort 'breaking the rules' to make Java better, and working to make it more efficient, but he didn't do that for C#.

        So we have... Java's raw implementation is slower than C#s
        But when combined with a server, Java Tomcat (still Linux? Or is it back to Windows) is faster than C# on IIS/Windows.

        No shit shirlock, really? Might as well add Python and ModWSGI on Apache then. Have, what is usually regarded as the performance king, in the comparison.

        I think just about everyone knows, performance wise with the same hardware, a server will be faster on about any *NIX but MacOS (and probably even that) than Windows.

        I think just about everyone ALSO knows that IIS is a steaming pile, and Apache is pretty damn good (IIRC TomCat is built on Apache).

        Now, if we compare the raw tests (C# vs Java) C# is faster, but when we move to the web servers, suddenly Java is better. That tells me... IIS is significantly (orders of magnitude) worse than Tomcat/Apache.
        That wasn't news a decade ago.
        And this is article longer a comparison of Java/C#

        • by bbn ( 172659 ) <baldur.norddahl@gmail.com> on Thursday January 17, 2013 @04:57PM (#42620741)

          But I also noticed, he spent a lot of time and effort 'breaking the rules' to make Java better, and working to make it more efficient, but he didn't do that for C#.

          It is clear that he is a Java novice and he admits so much. He failed to do it right, both his version of HttpServer and his ServerSocket are WRONG.

          HttpServer needs to be configured with a thread pool. If you fail to do that, it will run single threaded. And it is clear that is exactly what happened.

          ServerSocket is the old network API from the first version of Java. It was build with the idea of "one thread for each connection". Therefore all IO calls are blocking because you are supposed to run them in threads. ServerSocket has an accept call that will block until the next connection. You are then supposed to start a new thread (or use a thread pool) and let the new thread handle the new connection. He clearly failed to do that, instead he made a single threaded implementation.

          Modern Java frameworks use NIO - the new network IO for Java. This has non-blocking IO calls and allows much faster processing. It is also much harder to use on a low level, which is why most developers never do that.

          All of this explains why he is suddenly having much more luck when he switches to Tomcat. This takes him away from the low level stuff that he is doing wrong. Tomcat will do the IO correctly, it will use threads. It will AFAIK not use NIO however. But just doing it right using threads will give him a speed up of order of magnitudes.

          Conclusion: He was not spending a lot of time and effort on making Java better. He was trying to learn Java. Too bad that he failed. Great that he moved on to easier higher level Java.

      • by The Moof ( 859402 ) on Thursday January 17, 2013 @12:55PM (#42618311)

        Unfortunately, we don't know where exactly the performance difference lies.

        The test details are very, very light (some code would've been nice). However, just looking at the details we have, I see two issues with the C# testing in test #2 -

        1) The tests were pushed through the MVC4 Framework - this is an additional layer of unneeded overhead and processing for the C# tests. It's not mentioned if the Java requests were piped through an MVC engine.

        2) "I can have a servlet return some HTML, or I can return the results of a JSP page. These are analogous to the C# controller and View approaches, respectively." - This is incorrect. Servlets would be analogous to writing an HTTP Module, and JSP would be the equivalent to writing an ASPX page/HTTP Handler.

        These two problems probably stem from the author's unfamiliarity with C# on IIS outside of an MVC environment.

      • Perhaps this just shows that you can't just think about your language you might actually have to spend a few minutes thinking about the platform you'll run on. Don't throw it on Tomcat just because that is the first java server you find or IIS because it comes in the box.

        But ultimately at any sort of scale you are going to have redundant web servers, data servers, caching nodes etc. This is like testing how quickly the gas pedal goes down on the latest Porche when the engine, tires, transmission etc all hav

    • by cod3r_ ( 2031620 ) on Thursday January 17, 2013 @10:20AM (#42616557)
      Assembly is the only way to go when it comes to database oriented web apps.
    • by PhrostyMcByte ( 589271 ) <phrosty@gmail.com> on Thursday January 17, 2013 @10:32AM (#42616701) Homepage

      C# 5.0 (the latest version) has language-integrated async functionality that makes writing vertically scalable software a snap. It looks and behaves almost exactly like sync code, but actually runs async. Talking about server-side async here, not client-side.

      Doing the same thing with Java or an older version of C#, where you have only the base libraries to help you, is really quite tedious to do properly.

      So, for a test like this involving web development, I'd say language is actually a pretty relevant topic. Unless you've got lots of money to spend and can throw more hardware at something, the kind of perf improvement that can be provided by this is pretty astounding.

      But, there are problems with this test. He says explicitly that he's looking for a real-world test, but then goes and basically times a Hello World. There is no database access, no concurrent users. No real-world anything.

    • by Anonymous Coward on Thursday January 17, 2013 @11:07AM (#42617139)

      Unless you're running Facebook or Twitter, the odds are that you don't really need to be asking questions like this. The bottlenecks you encounter are more likely to be poor code within your codebase than anything intrinsic about the language.

      If you are running a site like Facebook that needs to scale beyond what that platform can realistically cope with, and your codebase is perfect and can't be made any faster, then it may be more feasible to do what Facebook did with PHP and fix the platform, rather than to switch to something different as that would involve rewriting your entire codebase, at which point you no longer have "perfect" code any more, and you lose the benefits of your dev team's existing skillset.

      But very few of us are ever going to be in that position. Facebook did what the needed to do given the circumstances, but the rest of us should just concentrate on improving our own code before criticising the platform we're using.

      Bottom line: If you write decent code, it doesn't matter what language it's in; all the major platforms are perfectly capable of running a high traffic web site. Conversely badly written code can and will bring even the most resiliant of servers to its knees. It's all about your code, not about the platform.

      Anyone who tells you otherwise and says "language X isn't capable of doing that" is being a language snob. Feel free to ignore them.

  • by hsmith ( 818216 ) on Thursday January 17, 2013 @10:10AM (#42616441)
    As your worst developer on the team.

    I've used both and really haven't seen issue with either. I have a slight preference for C#, personally, but it all comes down to your design, architecture, and implementation that will slow you down.
    • by Threni ( 635302 )

      And whether you prefer Visual Studio's IDE, or Eclipse.

      • Re: (Score:3, Funny)

        by teknopurge ( 199509 )
        Netbeans - Eclipse sucks.


        So does emacs. (vi!!!!)


        something something something LAWN!
        • Eclipse is much more user-friendly and stable than NetBeans in every iteration I have used it.

          • Eclipse is much more user-friendly and stable than NetBeans in every iteration I have used it.

            Most problems people have with Eclipse are due to crap plugins. If you pile a bunch of plugins into it, it will run like a dog.

          • by ImprovOmega ( 744717 ) on Thursday January 17, 2013 @11:18AM (#42617271)
            Eclipse is the emacs of the IDE world. It tries to be everything to everyone - infinite customizability, plugins, addons, tweaks you can make...it is at the point where for a new user it is really difficult to get a starting point to go from, and finding simple commands can be a PITA to find since they're in non-obvious (unless you've been using Eclipse for years) places.

            NetBeans does a better job of exposing the functionality you need, though the extensibility is more limited (like vi or nano).
          • by gshegosh ( 1587463 ) on Thursday January 17, 2013 @11:46AM (#42617585)

            Eclipse is much more user-friendly and stable than NetBeans in every iteration I have used it.

            That is interesting, my experience is completely opposite -- Netbeans is better focused on most often used functionality than on some niche stuff and extreme configurability almost noone needs, has shorter menus, less cluttered toolbars, has more intelligent and intuitive text editor (variable names guessing is so brilliant you don't notice it until you go back to other editors), has Alt-Tab that works instantly, etc. etc.

            It is also periodically reviewed for performance and tuned up, which results in amazing improvements between, say, version 6.5 and 7.2.

            Netbeans doesn't require me to get and configure additional plugins for SVN or Maven. It is much better integrated with application servers.

            etc, etc

            Have you tried Netbeans recently, or do you base your Eclipse preference on Netbeans 3.5? Because I have been forced to use Eclipse Juno for past 3 months and it is slow as hell, unintuitive, has menus that still require scrolling in full hd and still proposes arg0 as variable names...

  • Does it matter. (Score:5, Insightful)

    by Anonymous Coward on Thursday January 17, 2013 @10:10AM (#42616449)

    I personally would expect one to win in some regards and the other to win in others. My concern is that C# is too tightly bound to MS platforms. Java isn't perfect, it isn't the write once run everywhere that was promised, but the port from Java on MS to Java on Linux, Mac ... will most certainly be better.

    That is enough that I would prefer Java over C# on my projects. Of course there are always outside parameters that might be enough to tip the scale.

    • Re:Does it matter. (Score:5, Interesting)

      by i kan reed ( 749298 ) on Thursday January 17, 2013 @10:54AM (#42616993) Homepage Journal

      On the other hand, C#'s syntax has ruined java for me. Many simple tasks in java feel like they take 3 times as many steps as they need to: e.g. overloading a method with an optional bool defaulting to false requires actually writing a new overload and passing the default. To be fair, there are times when python or a functional language makes C# feel the same way, but java is just too far removed on the convenience factor for me.

      • Re:Does it matter. (Score:5, Insightful)

        by hsmith ( 818216 ) on Thursday January 17, 2013 @11:00AM (#42617053)
        I'll give it to MS, they have moved the language forward. Linq is amazing. Oracle has just isn't pushing forward as MS has done.
        • Re: (Score:3, Interesting)

          by adam.voss ( 1854938 )
          Thankfully there is scala ( http://www.scala-lang.org/ [scala-lang.org] ) on the JVM to advance language functionality while Java is not. I would say C# and scala are more feature similar than C# is to Java anymore, especially if Macros end up coming out of the Roslyn project.
      • by Nemyst ( 1383049 )

        Yeah, while I'm not a fan of being entirely bound to MS (though thanks to Mono that's not as much of an issue as it could be), C# just feels so much more modern than Java. Just having an actual event structure instead of passing through all sorts of hoops is refreshing, and then things like lambda functions, LINQ, extension methods and all that. No, none of it is essential, but it's mighty convenient and it also makes the code a lot more readable, which in my opinion is a much more important metric for wort

    • [Java] isn't the write once run everywhere that was promised

      I've been writing Java apps that run on Linux and Windows for a long time, and have yet to run into this. Can you give an example where using pure Java doesn't work the same across platforms?

  • A question? (Score:4, Insightful)

    by Coisiche ( 2000870 ) on Thursday January 17, 2013 @10:13AM (#42616483)

    I have seen it often said that when a slashdot headline ends in a question mark then the answer is no.

  • I used to see a fair number of errors(crashes) that were both java and .net on many huge sites. But now I primarily see errors from crashing java sites. That could be due to people dumping .net, .net cleaning itself up, or .net programmers getting better. Personally I don't use either (did years ago) but the huge number of errors that I would see on what should have been well developed sites is what kept me away going back to either.

    Now on smaller sites I see PHP crashes but I would expect to see more pe
  • source: experience (Score:2, Informative)

    by tehlinux ( 896034 )

    C# programmers get paid more.

  • by scorp1us ( 235526 ) on Thursday January 17, 2013 @10:18AM (#42616531) Journal

    Before I get modded troll, I'd like to point out that there is a really awesome C++ toolkit for web development and it will blow your mind. It's called Wt and it makes your applications fully OOP and a joy to develop in. One really awesome feature is that it is Boosted and another awesome feature is smart with regard to data. It will use where apropriate (usually you use the AJAX version of a control or mark a function for export to javascript) AJAX rather than statically filling your page. The result are some really easy to code fast websites.

  • by ranton ( 36917 ) on Thursday January 17, 2013 @10:20AM (#42616559)

    These tests were also just as simple as calculating Pi a thousand times. Based on the description, I was hoping for some tests where a website with a dozen or so complete views with significant bindings were created in both Java and C#. Instead it was just an HTTP request or a page that printed the date.

    Different frameworks and web servers are going to use varying amounts of overhead, so simple tests really only calculate that overhead. If you are going to provide benchmarks that actually have some meaning then they need to test complex enough behavior to mimic real world usage.

    These tests basically just show that Tomcat is faster than IIS for simple scenarios, or perhaps that ASP.NET MVC 4 adds more overhead to page requests than JSP does. Whether this overhead is meaningful when you are processing rich real world web pages is not covered by these tests.

    • Frankly, the obvious problem (from somebody who has done a bit of both JSP and ASP.NET development) is the use of the MVC framework on IIS, and nothing even remotely equivalent on Java. If this were going to be as close to an apples-to-apples test as possible, you'd use bare ASP.NET (a single .ASPX page, possibly with a code-behind .cs file) and a single .JSP page.

      I don't even think it's a matter of the author of the article having any agenda or something... I think he just honestly doesn't understand how to use the frameworks. For a very roughly analogous example from another programming domain, if I want to display a line of text on the terminal, I print a line of text. I don't go pull up the ncurses library and use it to create a one-line-tall TUI into which I create a label containing my text and then immediately exit. That would be... well, about as smart as using a heavyweight MVC framework to produce a web page containing the current time.

  • C#/CLR is much quicker when directly responding to HTTP requests; Java/JVM is a bit quicker when going through the popular web servers / stacks Tomcat and IIS.

  • The question is would you like to be hung or firing squad neither of them is very good.

  • C is the clear winner. Maybe that why its 1 number in TIOBE Programming Community Index [tiobe.com]

    However choice of programming language has a lot to do with what you want to do.
    If you want to create jobs to processing millions of records locally, C/C++ would be better.
    If you want to have secure web based jobs, Java would be better.
    If you want to create Windows GUI applications, C# would be better.

    Basically its horses for courses.
  • by MojoRilla ( 591502 ) on Thursday January 17, 2013 @10:26AM (#42616625)
    This article was obviously written by someone who has no idea what the state of the art is in performance web serving. If you know anything about high scale web technology, skip it.

    Where to start complaining? Don't roll your own http server. You probably don't understand what you are doing, and you will get weird results. Using Windows as a platform for a java web server is pretty silly. The author incorrectly assumes that because the .Net framework is fast, the ASP.net framework will be. That isn't the case. Running load testing on hello world test cases is silly. If you are interested in the real world, try testing with real world applications. The author also doesn't seem to understand that the JVM or .Net runtime will compile bytecode using JiT methods (Just in Time compiling). Finally, if you have skilled developers, it doesn't really matter what language you use. Architectural issues like data storage and caching are much more important than language.
  • Summary: (Score:5, Informative)

    by 140Mandak262Jamuna ( 970587 ) on Thursday January 17, 2013 @10:27AM (#42616635) Journal
    Test 1: a low level function, usually done by the http server, is written by the user in java and c#. C# beats java handsdown.

    Test 2: A function to generate a "full web site", (actually a simple web page with all the elements and trivial content). Java beats C# hands down.

    Conclusion:

    1. The testing guy has absolutely no idea of how to write low level function efficiently.

    2. The testing guy's idea of a "full web site" is woe fully inadequate. He could have been the guy designing "full continental breakfast" in Roach Motel Inc.

  • by Virtucon ( 127420 ) on Thursday January 17, 2013 @10:30AM (#42616681)

    "Real World?" If we're all not in the real world then we must be living in imaginary space then. Seriously, I see the C#/Java thing coming down to a matter of enterprise choice vs. performance of the language. You'll find big shops running WebSphere/Weblogic and those running JBoss to deploy enterprise apps. There's still a lot of folks deploying with tomcat, which is a great tool. Microsoft has done well over the past few years in improving IIS / .NET scalability where it now can compete with Java EE deployments. 5 years ago you couldn't say that but now the differences are becoming more narrow. I like Java and use it. I like C# and use it as well. My biggest concerns with both is that largely, they're in the hands of two very large vendors. Java has at least more open push on it but again, Larry Ellison will dictate largely what happens to Java and IMO he'll milk it for every penny he can get. C#/.NET not only sells OS licenses for MSFT but it also gets used as a toy as well.
    It would be really nice I guess if both of these were truly in the public domain as to prohibit Oracle and MSFT from having direct control over how the languages evolve and are licensed.

  • I thought the main reason to use java was to be OS independent. When your web page on Linux couldn't handle the load you could just move your code to a bigger Solaris or IBM box. Or when the PHB says he doesn't trust BSD to be secure he can move it all to Windows.

    I've not worked with c#. Is it multiplatform like java or are you stuck with running it on Windows?

  • The tests the author does not even close to a "real world" scenario. The conclusions drawn are meaningless and the article poorly written. I want the time I spent reading it back!
  • by jbssm ( 961115 ) on Thursday January 17, 2013 @10:50AM (#42616943)
    Graphs and charts, that brilliant and extremely high demanding tech from the XV century, that still didn't manage to be available to author of the study.
  • by RedHackTea ( 2779623 ) on Thursday January 17, 2013 @11:00AM (#42617059)
    Today, most of (if not all) the reasons for choosing a language are subjective instead of objective (not objective-c). Languages are so similar (at least the fundamentals, not talking about Brainfuck-lang here) that you pick a language based on the platform it targets or just personal feelings.

    In short, the Microsoft fanboys avoid more Linux-favored languages (and don't even think about Apple languages); Apple fanboys avoid more Microsoft-favored languages; and Linux fanboys avoid more patent-encumbered, closed-source languages and ones requiring to purchase an IDE/etc. for development. All fanboys avoid what they perceive as "diseased languages" like the plague. However, they will still touch these diseased language every now and then because either they have to for a job or out of pure curiosity.

    Being a Linux fanboy, C# is my bubonic plague. This is also in part growing up using Microsoft Visual Studio 6 for C++. For the haters, I actually loved this IDE, but then I found out that none of my code would work on other platforms or even other compilers with Win32 such as Borland++, g++, etc. (we all remember how a variable in a for-loop wouldn't be contained to just that block... terrible). And then when exploring other languages/environments, I couldn't believe my eyes when I could actually see library-level source code -- you have no idea how useful this is. Even though I'll admit that Microsoft has gotten a little better about this (although they still tried to spread FUD using the DroidRage campaign), it's not worth it to me. They've already lost my faith in them as a customer, and I can't see myself ever returning.

    Now, a good study would be to remove all of this and determine what languages are either faster to code in, easier to debug/maintain/extend with enterprise-level code, or more readable. But would this study even be useful? The differences would be so minute. Scripting languages are going to be faster to code in, so what's the fastest scripting language to code in? Object-oriented languages will be the easiest to debug/maintain/extend. As for readability, who knows? It's so subjective. We'd have to get a large, random sample size of people that have never seen a programming language before.

    Having said all of this, I still appreciate this guy doing the study. Apache has always made top-quality code, and it's good to see that TomCat lives up to it.

    Finally, as for sheer speed (and needs to be at least easier than assembly), C will always win.
  • Who cares? (Score:3, Interesting)

    by characterZer0 ( 138196 ) on Thursday January 17, 2013 @11:08AM (#42617153)

    So what if there is a 25% different in performance? Hardware is cheap. Software maintenance, administration, and licensing is expensive. The most compelling reason to use Java is that I can run it on Linux. That means I can clone VMs for development and testing, copy OS installations, and ship VMs to customers and resellers without having to spend time and money on licensing and activation. It makes development, testing, and deployment easier to automate when possible and hack when necessary for the small guys that don't have volume license agreements. .NET isn't the problem. Windows is.

  • by borgasm ( 547139 ) on Thursday January 17, 2013 @11:54AM (#42617671) Journal

    I ran a similar test like this when I was having performance troubles with one of my QA apps.

    I had written it in C# because I was bored and wanted to explore the language a little bit. I ran into issues with threading and performance when ramping up TCP connections and data processing.

    I did a line-by-line rewrite into C++ (seriously, I copied the source and translated each line)....and all my performance problems went away.

    In my experience, both Java and C# are easy to write, but abysmal when it comes to performance.

  • by WaffleMonster ( 969671 ) on Thursday January 17, 2013 @01:07PM (#42618455)

    While not very fair I've always tended to judge languages by their outcomes in terms of usability. From freeware utilities to products from large vendors, to websites using certain three letter extensions there have been certain recurring themes I have noticed throughout the years. Perhaps it is all expectation bias or a reflection of the culture of people who would use certain tools.. I won't pretend to know.

    Is it fair to blaim PHP for SQL injection vulnerabilities found in PHP apps?

    Is it fair to blame Java when an application outputs a stack trace and keeps on truckin as if nothing just happened?

    Is it fair to blame Java when an application is as slow as a drunk snail or consumes mind boggling amounts of memory?

    I think in the aggregate it might be possible to make the case for the quality of a programming language based on certain properties of a large sample of resulting programs.

    What is the most interesting to me is the disconnect in effort spent by language designers to produce these modern languages and actual resulting outcomes. Why is ancient C(++) still soo popular and what gets used to write all of the core software? Why do we still have operating systems, network stacks and web browsers built in C when we have all of these superior languages with all of their holier than thou ivory tower labled features?

    When is a _general purpose_ language going to come along that actually enables people to get amazing results which would not otherwise be feasible without the use of said language?

    Who wouldn't cringe if they found out the latest version of their favorite browser had been rewritten in Java or .NET? In my view all TFA is doing is comparing the realitive intelligence of two mentally challenged competitors. I actually like both languages...NET somewhat more than Java. I just tend to not like the resulting program that comes out the other end.

  • Duh. (Score:4, Insightful)

    by wcrowe ( 94389 ) on Thursday January 17, 2013 @04:22PM (#42620435)

    Well gee, let's see. I can definitely say that C# programs do not perform as well on OSX, Linux, or IBM I.

As you will see, I told them, in no uncertain terms, to see Figure one. -- Dave "First Strike" Pare

Working...