Slashdot Mirror


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

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."

108 of 437 comments (clear)

  1. Language is hardly relevant by InterBigs · · Score: 5, Insightful

    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.

    1. Re:Language is hardly relevant by QBasicer · · Score: 5, Insightful

      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.

      --
      x86, oh yes, I'm pro.
    2. Re:Language is hardly relevant by cod3r_ · · Score: 5, Funny

      Assembly is the only way to go when it comes to database oriented web apps.

    3. Re:Language is hardly relevant by samkass · · Score: 5, Interesting

      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...

      --
      E pluribus unum
    4. Re:Language is hardly relevant by PhrostyMcByte · · Score: 5, Insightful

      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.

    5. Re:Language is hardly relevant by squiggleslash · · Score: 5, Funny

      No, that's not fine tuned enough. Standard practice here is to program an FPGA to do the less important work, with wire wrapped transistors doing anything that needs to perform well.

      Anything less is, well, lazy.

      --
      You are not alone. This is not normal. None of this is normal.
    6. Re:Language is hardly relevant by Anonymous Coward · · Score: 2, Insightful

      You've gotta be kidding.

      Hey, I know of this great conspiracy site...

    7. Re:Language is hardly relevant by Electrawn · · Score: 2

      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.

    8. Re:Language is hardly relevant by squiggleslash · · Score: 5, Insightful

      I've seen Tomcat on Windows a lot. Remember that most Enterprise environments until relatively recently used Windows for everything, but also bought into Java as the development platform to standardize on. Developers would be required to develop Java under Windows, and the Gods of IT would refuse to countenance a Linux server in their server room even if the developers wanted Windows.

      RHEL's rise has changed things somewhat, but it's still a common combination.

      --
      You are not alone. This is not normal. None of this is normal.
    9. Re:Language is hardly relevant by Anonymous Coward · · Score: 5, Insightful

      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.

    10. Re:Language is hardly relevant by darjen · · Score: 5, Informative

      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.

    11. Re:Language is hardly relevant by zifn4b · · Score: 3, Interesting

      Assembly is the only way to go when it comes to database oriented web apps.

      This is what I find funny about C++ zealots who hate .NET and java. Interestingly enough, Microsoft had an incubating effort to build a "framework" called Casablanca that would give C++ developers an easy way to host a web server or a RESTful web service. Part of the C++11 standard is incorporating features in languages like C# and java. It's interesting to watch the pendulum shift back and forth and the philosophical arguments being argued from ivory towers.

      --
      We'll make great pets
    12. Re:Language is hardly relevant by red_dragon · · Score: 3, Informative

      ... 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 installs the Tomcat Native Connector, which improves performance considerably. And there's a lot of vertical market applications for Windows that bundle Tomcat.

      --
      In Soviet Russia, Jesus asks: "What Would You Do?"
    13. Re:Language is hardly relevant by Anonymous Coward · · Score: 2, Informative

      Facebook has practically reinvented PHP and also has some parts of their code in C (or C++, not sure)

      Facebook has significant parts in C++, and employed people like Andrei Alexandrescu to do some of the heavy lifting. He has given some talks with regards to computational efficiency in C++ for Facebook, based on his work.

    14. Re:Language is hardly relevant by sideslash · · Score: 4, Funny

      At my shop we engineer universes to produce all desired output at the exact moment it's needed with zero latency. It's a highly parallelized operation. Unfortunately, we currently occupy one of the universes that got mostly wrong answers.

    15. Re:Language is hardly relevant by Anonymous Coward · · Score: 5, Insightful

      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.

    16. Re:Language is hardly relevant by TyIzaeL · · Score: 5, Informative

      You must not work in the education sector. PowerSchool 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.

    17. Re:Language is hardly relevant by Anonymous Coward · · Score: 5, Funny

      Dueling useless anecdotes.

    18. Re:Language is hardly relevant by lightknight · · Score: 3, Insightful

      This is Sun we're talking about, now Oracle; they were the original planet weird when it came to implementing programming languages. Swing is one of the few things I've seen leave programmers speechless with frustration.

      Plus Oracle has been doing so well with their JREs that even DHS has recommended disabling their plugins lately.

      --
      I am John Hurt.
    19. Re:Language is hardly relevant by Anonymous Coward · · Score: 2, Funny

      Yes, it’s called “Slashdot”.

    20. Re:Language is hardly relevant by SJHillman · · Score: 5, Funny

      If you measure efficiency in terms of average revenue per line of code, it's hard to beat MS. I mean, look at Vista, it was a single line of code calling bluescreen.bmp and it made them millions.

    21. Re:Language is hardly relevant by Anonymous Coward · · Score: 5, Informative

      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.

    22. Re:Language is hardly relevant by Anonymous Coward · · Score: 4, Interesting

      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.

    23. Re:Language is hardly relevant by bfandreas · · Score: 2

      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 the misfortune to acquire Java and all tech attached after the hippies at Sun decided to have an open plattform. It's amazing what you have to pay for when using C# as compared to Java or Perl. The server side open-source community isn't behind .NET. Apache springs to mind.

      If performance is your main concern THEN YOU TAKE A LOOK AT THE WHOLE THING and measure where in your application you spend the most time. Do you spend too much time in the database? Do you lose too much time during network connects? Does your streaming performance not live up to scratch? Yep, these are real world issues.
      What a waste of everybody's time!

      --
      20 minutes into the future
    24. Re:Language is hardly relevant by Anonymous Coward · · Score: 5, Funny

      At my company we travel back it time and tweak the early universe to give the appropriate settings in the present day. It's currently optimised for cat videos which is probably why your settings aren't working.

    25. Re:Language is hardly relevant by PhrostyMcByte · · Score: 3, Informative

      Threading is a form of async, but not the one I meant.

      I was referring to async I/O, where you can request the OS perform some I/O and then notify you when it's complete without blocking any of your threads. This enables you to write apps with co-operative multitasking where you switch between tasks while you wait for I/O, which is far more efficient than switching between threads.

      With this model you can (somewhat) easily service 10,000 clients per-thread.

      Typically this form of async is done using callbacks or eventing, which is doable with some practice but creates code which is really gnarly to anyone lacking experience with async. .NET has supported this form of async for many years, and I believe Java's NIO library provides the same thing.

      C# 5.0 takes it a step further and gives an incredibly useful syntax sugar -- basically hiding all the callbacks, making it look like a simple synchronous method. Behind the scenes, the C# compiler generates a state machine class that does all the heavy lifting.

    26. Re:Language is hardly relevant by Pieroxy · · Score: 3, Insightful

      That and the fact that his "simple" test took longer to run than his supposedly more complex test in Java. Something wrong with the first test ? With the second?

      Well, something very wrong with the overall test. When your results contradict themselves, you should not publish them.

    27. Re:Language is hardly relevant by aztracker1 · · Score: 2

      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 I've seen in either environment are over-engineered crap... If you aren't doing unit testing, and aren't supporting multiple backends, then WTF are you abstracting your data tier through interfaces, and factories? It increases development time in the short term, and in the long term increases maintenance costs. I mean, I think unit testing can be a good thing, and that test environments are important, but sometimes you *SHOULD* make assumptions in favor of the simplest solution that works.

      All of that said, about half of my new development lately has been NodeJS in WebStorm, which I feel is the best fit to my workflow, even if it is a little like running with scissors. In any case 99% of the time, the architecture being used will be whatever your developers are most comfortable with, combined with some pragmatic choices based on availability of drones (I mean employee/contractor developers) with the skills needed to maintain your codebase with the least training costs. Most applications can handle a few thousand simultaneous users without imploding regardless of the backend architecture. Scale is a complicated problem in any case, and gets very complicated depending on what any actual bottlenecks are, and where consistency is more important than actual raw performance under light load.

      --
      Michael J. Ryan - tracker1.info
    28. Re:Language is hardly relevant by Anonymous Coward · · Score: 5, Funny

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

      Then you haven't seen shit.

    29. Re:Language is hardly relevant by LordLimecat · · Score: 2

      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.

    30. Re:Language is hardly relevant by ByOhTek · · Score: 3, Informative

      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#

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    31. Re:Language is hardly relevant by The+Moof · · Score: 3, Informative

      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.

    32. Re:Language is hardly relevant by Samantha+Wright · · Score: 5, Funny

      Isn't there a free implementation of that in Emacs?

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
    33. Re:Language is hardly relevant by tarius8105 · · Score: 2

      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.

    34. Re:Language is hardly relevant by asliarun · · Score: 4, Interesting

      No, that's not fine tuned enough. Standard practice here is to program an FPGA to do the less important work, with wire wrapped transistors doing anything that needs to perform well.

      Anything less is, well, lazy.

      From what (little) I know, that's exactly what data warehouse appliances like Netezza and Teradata do. They have custom built FPGAs to do the SQL execution significantly faster than what a CPU can do.

    35. Re:Language is hardly relevant by luis_a_espinal · · Score: 2

      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. Windows (and before that, DOS) was only on the clients, and sometimes not even that because clients were typically nothing more than VT100 green-ugly terminals.

      In general, the "enterprise" does not (and has not) run on windows until recently. The client-side delivery of things and stuff like Microsoft Exchange and ActiveDirectory might, but the rest, back-end servers, database servers, content management servers, caching servers, address validation servers, proxies and firewalls, all that stuff runs predominantly on UNIX.

      but also bought into Java as the development platform to standardize on. Developers would be required to develop Java under Windows,

      Required? Never seen anything like that. Maybe your experience is different from mine, but again, 8 different companies in distinct industries since 1998, and I've never seen anything like that. Granted, you can do your coding in Windows (which I do at times), but you also typically have a dedicated UNIX server for compilation and testing (and more often than not, a development user account on said server(s)).

      People doing Java development exclusively in Windows without a developmental stage prior to testing on the intended platform (UNIX/Linux + Java), that's just asking for shit to blow up in pieces.

      and the Gods of IT would refuse to countenance a Linux server in their server room even if the developers wanted Windows.

      What year are we talking about here? The late 90's?

      RHEL's rise has changed things somewhat, but it's still a common combination.

      Your work experience is very strange. When I worked for a very large banking organization (Citicorp), it was all UNIX and Linux (and that was 2001 already). Man, I know of large ties-and-suits insurance companies that were adopting Linux (the Slackware distros of old which predated RedHat by internet eons) in their server rooms back in 1997. And I don't necessarily live in a technology-embracing area so to speak.

    36. Re:Language is hardly relevant by Anonymous Coward · · Score: 5, Informative

      Sorry to burst your bubble, but Pearson is a private company. It is not an academic institution. You can blame this on bureaucracy in large institutions making bad choices, but teachers don't get a say on this stuff. The leadership does.

    37. Re:Language is hardly relevant by swb · · Score: 5, Informative

      You've never been in education, have you? It shows.

      "Educators" are the actual teachers. They have near zero say in what systems get selected, and those doing the selecting seldom have any experience in being an educator, and usually the selection committee ("Committee Decisions: Because you can't fire the committee") is judging the software on features and functionality, not on underlying technology.

      If there is someone in a specific educational organization who has specific architectural biases against Windows, I can assure you they have nothing to do with system selection, only implementation.

      And what are the VIABLE alternatives? Professionally I've worked with several educational institutions that have made a run at being all Macintosh, and it has always been a dismal and expensive failure on the back end. They all migrated to Windows servers and kept Macs only for teachers and students, if that.

      Linux may be viable for some functions, but with most of these things it boils down to dollars. Linux may be "free" but support isn't, and finding people who can support it is expensive for school districts, at least a datacenter level and not a kludged whitebox install level. Maintaining an all-Linux backend usually requires a lot of high level administrative support and the administrators I can guarantee you are looking at COST first THEN functionality and they will ALWAYS see a Microsoft-based solution as inherently cheaper "because we already do that."

    38. Re:Language is hardly relevant by cfulton · · Score: 3, Insightful

      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.

      --
      No sigs in BETA. Beta SUCKS.
    39. Re:Language is hardly relevant by Beetjebrak · · Score: 5, Funny

      That comment was actually better the second time I read it.

      --
      Learn from the mistakes of others. There isn't enough time to make them all yourself.
    40. Re:Language is hardly relevant by ahabswhale · · Score: 2

      You do realize that Java is one of the fastest languages on the planet, right? And unlike C#, it's fast on many different operating systems.

      --
      Are agnostics skeptical of unicorns too?
    41. Re:Language is hardly relevant by yoshman · · Score: 2
      I would say that async/await turned out to be a lot less useful compared to how it could have been. The .Net team figured out how to write very clever and efficient iterators by letting the compiler construct a state machine under the hood, a great hammer in the .Net toolbox.

      The risk with figure out something really clever is that you want to apply it to more things, and the .Net team applied their compiler trick to the wrong thing. Sure, it will work for GUI programs that might create 100 or even 1000 concurrent with async. But unless I completely has misunderstood how they implement this , async/await in C#5 will not scale to 100.000 concurrent tasks as it will put way to much presure on the GC and the memory bus due to the way they. (lots of memcpy from the stack into the heap when an async task need to block).

      Description of how it is working under the hood can be found here
      http://msdn.microsoft.com/en-us/magazine/hh456402.aspx

      The trick applied here is to put all the automatic variables on the stack just as expected, but a method marked as "async" might "lift" the local variables into a Task instance (i.e. allocate a piece of memory an copy the needed context from the stack into that memory area). This won't scale well in scenarios where you have hundred-of-thousands of concurrent clients to track, and they are doing a lot calls that need to block for some time.

      Erlang and Go got this right, they don't allocate large number of memory areas and copy stuff around, they just ensure that every new process/goroutine (equivalent of Task in Erlang/Go) can start out with a _very_ small stack (like 200-300 bytes) and switching to a new process/gorouting will just involve switching the CPU-registers (including the stackpointer).

      C# got another thing wrong in the process: marking a method returning T as async changes the signature of that function. It now returns Task instead. That is bad because you have to decide upfront which methods you want to run asynchronous and which to run synchronous, unless you are prepared to break your API later. Yet again something Erlang and Go got right, the signature of a function is always the same as you always implement it as if it would run synchronous. The _caller_ of your function determins if he/she want to make a synchronous ("normal" call) or asynchronous call (just wrap it into a process/goroutine).

      They rewritten the async API 3 times in .Net now, they need at least one more try to get it right.

    42. Re:Language is hardly relevant by Dcnjoe60 · · Score: 2

      You've never been in education, have you? It shows.

      "Educators" are the actual teachers. They have near zero say in what systems get selected, and those doing the selecting seldom have any experience in being an educator, and usually the selection committee ("Committee Decisions: Because you can't fire the committee") is judging the software on features and functionality, not on underlying technology.

      If there is someone in a specific educational organization who has specific architectural biases against Windows, I can assure you they have nothing to do with system selection, only implementation.

      And what are the VIABLE alternatives? Professionally I've worked with several educational institutions that have made a run at being all Macintosh, and it has always been a dismal and expensive failure on the back end. They all migrated to Windows servers and kept Macs only for teachers and students, if that.

      Linux may be viable for some functions, but with most of these things it boils down to dollars. Linux may be "free" but support isn't, and finding people who can support it is expensive for school districts, at least a datacenter level and not a kludged whitebox install level. Maintaining an all-Linux backend usually requires a lot of high level administrative support and the administrators I can guarantee you are looking at COST first THEN functionality and they will ALWAYS see a Microsoft-based solution as inherently cheaper "because we already do that."

      Yes I have been in education. Teachers are not the only educators. Most of the administration are educators, too, often with advanced degrees. While I agree that the teachers are not making those decisions, surely the administration is. I was in no way inferring that the teachers are the problem, but, like doctors, most professional educators don't make the best business decisions, probably because those decisions are outside their area of expertise. That's not a condemnation, just an observation.

    43. Re:Language is hardly relevant by shutdown+-p+now · · Score: 3, Funny

      No-no-no. The only way to write databse-oriented web apps is surely PL/SQL!

    44. Re:Language is hardly relevant by Dcnjoe60 · · Score: 2

      Ummmmm, Unix has been the server platform of choice in practically every secondary education institution in the US (one might even say on Earth) since time immemorial. It would be HIGHLY unusual to see anything with "University" in its name running any significant outward-facing IT infrastructure on Windows. Smaller and newer institutions, yes perhaps, but even most colleges that have been around since the 80's are basically Unix shops (and these days are mostly basically Linux shops, though you will still find a decent amount of AIX/Solaris/etc here and there). Not to say that Windows isn't quite common and even prevalent in some niches in the schools I've been associated with, but none of them would have had any difficulty or hesitation in running a line-of-business web application on a *nix platform, and most wouldn't have even thought about using Windows for that unless there was a specific reason for doing so.

      They were talking about the public school system K-12.

    45. Re:Language is hardly relevant by PickyH3D · · Score: 3, Insightful

      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.

    46. Re:Language is hardly relevant by pkphilip · · Score: 2

      We have the @Asynchronous annotation in Java 6 that pretty much does the same thing.

      http://docs.oracle.com/javaee/6/api/javax/ejb/Asynchronous.html

      It is actually pretty nifty.

    47. Re:Language is hardly relevant by gangien · · Score: 3, Interesting

      Swing is one of the few things I've seen leave programmers speechless with frustration.

      umm what? as much as a pain as layouts can be to get things to do what you want, swing was still really well done and is incredibly flexible and versatile. I'd hardly call swing something form planet weird. And having worked with solaris/sunos some, it's really well done as well. Honestly, saying sun was from planet weird is just... weird to me :P

    48. Re:Language is hardly relevant by benjymouse · · Score: 4, Informative

      We have the @Asynchronous annotation in Java 6 that pretty much does the same thing.

      No it does not do "pretty much the same thing". Not even close.

      To start with, the @Asynchronous annotation is for EJB session beans only.

      C# async is a generalized async capability baked into the language. C# async works with disk IO, network IO, threads or anything else that follows one of several async patterns.

      The big boon with async compared to task based parallelism (on which C# async is based) comes from the capability to write the code in a pseudo-sequential form and (not least) the ability to *compose* async tasks.

      Think about how you handle exceptions in a flow of, say, 3 async calls. Without language support for async you have to register callbacks or futures which will execute once the previous task completes. How would you go about defining an exception handler that covers all 3 calls? You can't; not without some serious wrangling with closures and state machines.

      Now think about how you would create a loop over async task #2. You cannot span a single while loop across the task call because the task will call back to a continuation function which syntactically needs to be *outside* the loop.

      Now combine the loop with the exception handler. In Java this gets so unwieldy that it is next to impossible. In C# it is trivially easy and reads like sequential code:


      try{
              var res1 = await FirstAsync();
              while(someCondition) {
                    await SecondAsync(res1);
              }
              var res3 = await ThirdAsync(res1)
      } catch (SomeException ex) { ...
      }

      GP is correct, the async continuations is C# are pretty unique at this point.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    49. Re:Language is hardly relevant by RocketRabbit · · Score: 2

      Are you shitting me? Microsoft, through a campaign of relentless Pharisaic marketing and subversion, has managed to get MANY universities to convert to Windows on the backend. Sure, it sucks, but at this point your average Uni IT department is filled to the brim with CTO types and diversity hires, not actual geeks. These shills in training know which side of the bread their butter is on.

      Because many of these departments simply waste all their money, the new hipness is to offer some half-assed cloud solution so the school can function while IT subjects selected lab monkeys (departments) to ever stranger IT setups.

      The university is dead as far as It goes.

    50. Re:Language is hardly relevant by dkf · · Score: 2

      Swing is one of the few things I've seen leave programmers speechless with frustration.

      I see you've never used Motif. Direct use of Xlib is nicer and less frustrating than Motif. Heck, personally whistling the X protocol down a telephone line connected to a 300 baud modem would probably be better than Motif. Did I mention that I really disliked Motif, and think that no matter how much GTK and Qt are idiotic, they still do a better job?

      Swing's main problem was that every single one of the layout managers was crap (and writing a good one is genuinely hard, though that's actually not a Java problem per se but rather due to the fact that the algorithms required to do a good job are genuinely tricky).

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    51. Re:Language is hardly relevant by bbn · · Score: 3, Informative

      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.

    52. Re:Language is hardly relevant by ILongForDarkness · · Score: 2

      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 have a part in determining how fast the car can handle the same road (load pattern in the case of a web presence).

    53. Re:Language is hardly relevant by stenvar · · Score: 4, Insightful

      Maintaining an all-Linux backend usually requires a lot of high level administrative support and the administrators I can guarantee you are looking at COST first THEN functionality and they will ALWAYS see a Microsoft-based solution as inherently cheaper "because we already do that."

      That's utter nonsense. In reality, Linux is no harder (and probably easier) to maintain than Windows: it's less complicated, its interfaces and tools change less over time, and there are numerous ready-made, turnkey server solutions that you basically just boot up and use. More CS grads will know and will have administered Linux systems than Windows systems because administration for Linux systems is much more similar between single user and multi-user.

      School administrators may choose Windows because they believe it's easier to maintain, but they are mistaken.

    54. Re:Language is hardly relevant by phantomfive · · Score: 2

      Swing is one of the few things I've seen leave programmers speechless with frustration.

      Wow, you must not have done anything with MFC.

      --
      "First they came for the slanderers and i said nothing."
  2. They are both as good by hsmith · · Score: 5, Insightful

    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.

    1. Re:They are both as good by Threni · · Score: 2

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

    2. Re:They are both as good by teknopurge · · Score: 2, Funny

      Netbeans - Eclipse sucks.


      So does emacs. (vi!!!!)


      something something something LAWN!

    3. Re:They are both as good by MacGyver2210 · · Score: 2

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

      --
      If the only way you can accept an assertion is by faith, then you are conceding that it can't be taken on its own merits
    4. Re:They are both as good by nitehawk214 · · Score: 2

      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.

      --
      I'm a good cook. I'm a fantastic eater. - Steven Brust
    5. Re:They are both as good by ImprovOmega · · Score: 5, Insightful

      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).

    6. Re:They are both as good by gshegosh · · Score: 3, Interesting

      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...

    7. Re:They are both as good by ripdajacker · · Score: 2

      IntelliJ IDEA does the job for me, surely beats Eclipse in terms of out of box functionality.

  3. Does it matter. by Anonymous Coward · · Score: 5, Insightful

    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.

    1. Re:Does it matter. by i+kan+reed · · Score: 5, Interesting

      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.

    2. Re:Does it matter. by hsmith · · Score: 5, Insightful

      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.

    3. Re:Does it matter. by Nemyst · · Score: 2

      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 worth than raw performance, which isn't going to be that different anyways. If the code is intuitive and easy to parse, it's likely going to be easier to maintain and expand, which can have much more important long-term impact on performance than anything in the language's intrinsic speed.

    4. Re:Does it matter. by thetoastman · · Score: 2

      I haven't used mono on Linux in a while, so maybe it's been improved. Earlier versions on Fedora were a mess.

      One of the biggest issues I had with mono was its clash with SELinux. There was just no way to get Apache HTTPD / Mono / SELinux to play nicely together. After the fifteenth or sixteenth custom SELinux rule I just punted. I lodged all the SELinux bugs with Mono, and there they sat.

      Another issue I had was with hard-coded ports. It was very difficult at the time to run both the Mono server and something like Tomcat on the same platform. To me, this was the only reasonable way to test ease of development, software release, and performance. Unfortunately, I didn't have a set of identical boxes at the time.

      Due to all of these infrastructure issues (including chasing down obscure libraries - I don't mind building them), I abandoned C# / Mono and happily run everything on Tomcat or Glassfish (or Jonas or JBoss, etc). Tomcat just works on every platform I run it on. I run it on Linux, I run it on XP, I run it on Windows 7 (haven't tried Windows 8 yet), I run it on MacOS. The same web application (if written properly) runs on all of those platforms without change.

      I'm not much of a developer - more a systems architect - but I've developed Java - based web applications on Windows, Macintosh, and Linux. I use the same tools (I'm a NetBeans / Maven fan), and they operate in the same way across all platforms. To me, having a platform - agnostic environment is very important. I am then not constrained (nor do I have to constrain team members) to a particular environment. I work on Linux, the servers run on Linux, most people develop on Windows, and there is one person on a Macintosh. And yes, right now I'm posting from a Windows machine.

      I can do the same thing with PHP, Ruby, Python, Scala, Lua, Perl, or Scheme. I cannot create a flexible, platform - agnostic environment with C#. I also have issues with the C# language, but this isn't really a language wars thread.

    5. Re:Does it matter. by adam.voss · · Score: 3, Interesting

      Thankfully there is scala ( http://www.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.

    6. Re:Does it matter. by StormReaver · · Score: 2

      [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?

  4. Re:Which one is the bigger security threat? by clark0r · · Score: 4, Informative

    This would be the browser plugin you're talking about? Websites are not served up by browser plugins. Stop spreading lies.

  5. A question? by Coisiche · · Score: 3, Insightful

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

    1. Re:A question? by Anonymous Coward · · Score: 2, Funny

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

      Maybe I should create a programming language, call it "no", and then submit a Slashdot story "What is the best programming language around?" :-)

    2. Re:A question? by Tridus · · Score: 3, Insightful

      Not just slashdot, but you're right: http://en.wikipedia.org/wiki/Betteridge's_law_of_headlines

      --
      -- "So they told me that using the download page to download something was not something they anticipated." - Bill Gates
    3. Re:A question? by Anonymous Coward · · Score: 3, Funny

      Next up: Is Betteridge's law always right?

  6. source: experience by tehlinux · · Score: 2, Informative

    C# programmers get paid more.

    --
    Most linux users don't know this, but the man pages were named after Chuck Norris. Chuck Norris fsck'ing hates noobs!
  7. Just do it all in C++ by scorp1us · · Score: 5, Informative

    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.

    --
    Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
    1. Re:Just do it all in C++ by Anonymous Coward · · Score: 2, Funny

      In response to the trolling:

      C#/Java Fanboy Defense Force, assemble!!

    2. Re:Just do it all in C++ by Anonymous Coward · · Score: 2, Interesting

      With all respect, Wt is interesting platform, but it does NOT provide the same kind of web applications as tested.

      Wt basically is sort of equivalent of terminal access to machine where the whole application process runs as single process per user. Obviously, this approach has advantages, but you would not want to implement something like 'slashdot.org' in Wt.

      (But, speaking about C++ web frameworks: http://www.ultimatepp.org/srcdoc$Skylark$Tutorial$en-us.html)

  8. These tests were also simple by ranton · · Score: 5, Insightful

    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.

    --
    -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    1. Re:These tests were also simple by cbhacking · · Score: 3, Insightful

      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.

      --
      There's no place I could be, since I've found Serenity...
    2. Re:These tests were also simple by ranton · · Score: 2

      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.

      So, get cracking. What's stopping you from doing the test yourself and publish the results?

      My current area of research is in automated database design, and there are only so many hours in the day. My own tests have shown that C# using LINQ performs better for me than either Java or even my best attempts at C++, but these personal experiments are nowhere near publishable. They likely only show that I am more proficient at C#. But that was good enough for me since my objective was to see what language I should be doing my own experiments in right now, not in a fantasy world where I had enough time to become just as efficient in these other languages.

      The sad thing about it is that if you actually did some work, some other idiot would complain that your test was dissapointing, and that he was expecting more.

      There is a difference between nitpicking and pointing out that a research project did not even come close to meeting its own goals. These tests do hold some value in showing the maximum potential performance of these different frameworks and web servers. But that does not change the fact that these experiments did not test what the project summary said they were trying to test.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
  9. Which is better bad or worse? by silas_moeckel · · Score: 2

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

    --
    No sir I dont like it.
    1. Re:Which is better bad or worse? by clark0r · · Score: 3, Informative

      it's "hanged".

    2. Re:Which is better bad or worse? by Coisiche · · Score: 2

      I think that statement requires additional qualification.

      The colloquial extremes I have heard are "well hung" and "hung like a budgie".

  10. If you want sheer performance.... by prasadsurve · · Score: 2

    C is the clear winner. Maybe that why its 1 number in TIOBE Programming Community Index

    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.

  11. Nothing to see here by MojoRilla · · Score: 5, Insightful

    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.

  12. Summary: by 140Mandak262Jamuna · · Score: 5, Informative
    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.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  13. I don't like the premise. by Virtucon · · Score: 3, Insightful

    "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.

    --
    Harrison's Postulate - "For every action there is an equal and opposite criticism"
  14. Re:Question by doti · · Score: 2

    It's a trap to try and make us look at TFA.

    --
    factor 966971: 966971
  15. What a bunch of... words. by jbssm · · Score: 2

    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.

  16. Re:Android uses Java, at least Dalvik java by squiggleslash · · Score: 4, Insightful

    * Dalvik is not Java. While the Java programming language is available for Dalvik, together with a subset of the J2SE library, the runtime itself is unrelated.
    * Windows 8 Metro "does not use .NET" is kinda meaningless, neither does Win32. However, you certainly can build Metro apps in .NET. http://blogs.msdn.com/b/dotnet/archive/2012/04/17/net-for-metro-style-apps.aspx
    * The comment about the author of the article testing Java "by using a C# client" is bizarre and misleading. A language had to be picked, with the choice having the same impact on both tests. Chosing to test a Java server with a Java client, and then a C# server with a C# client would cause the test to be different in both situations and render the test results invalid.
    * The author of the article concluded that Java was generally faster than C#, not that "it was a dog".
    * Other than that, your comment is completely 100% correct. Possibly. Or maybe I didn't check.

    --
    You are not alone. This is not normal. None of this is normal.
  17. Re:Useless benchmark by godefroi · · Score: 2

    The C# runtime doesn't interpret bytecode. It's all JITted before execution. Always.

    --
    Karma: Poor (Mostly affected by lame karma-joke sigs)
  18. Choosing a Language by RedHackTea · · Score: 5, Insightful

    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.

    --
    The G
  19. Java is open source... really? by JcMorin · · Score: 2

    Really? Why do Oracle claim ownership of the code and even the api to company like Google? Threatering everyone who implement their variant of Java? On the other hand most of the C# library have been release the source code and the language is itself fully approved by EMCA and ISO (check wikipedia for reference), something Java is not (Because Java lacks any formal standardization recognized by Ecma International, ISO/IEC, ANSI, or other third-party standards organization, the Oracle implementation is the de facto standard.). .NET doesn't run only on Windows, Mono is project that exist for a while and it's use in many context. You can developer even application for Andriod phone in C#, because the language is open, you are welcome to make a compiler and re-use it everywhere!

  20. Who cares? by characterZer0 · · Score: 2, Interesting

    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.

    --
    Go green: turn off your refrigerator.
  21. Re:are they serious right now? by 0123456 · · Score: 5, Insightful

    Open Office is slow as hell.

    Repeat after me: Open Office is not written in Java, though it uses Java for some optional features. Yon don't even need Java installed to run Open Office, and disabling Java does reduce Open Office startup time since it no longer needs to start the JVM.

    But it's a good meme to keep repeating, because when someone says 'Java sucks because Open Office is slow' and they're not talking about startup time, it's a very good indication that they have no clue.

  22. Re:Microsoft: Make everything magic with reflectio by cbhacking · · Score: 2

    If you think Reflection usage is bad in ASP.NET MVC, you've obviously never seen Spring...

    Also, the "whatever Java has" above is "nothing" because the idiot tested a bare JSP running on Tomcat vs. a ASPX running on top of the entire MVC framework on top of IIS. Yeah, no wonder the perf is going to suck; that's a huge amount of completely wasted overhead. IIS can serve a dynamic ASPX page without any of that MVC garbage just fine, thank you... and with that, get rid of all the Reflection and so forth that, while actually useful in seriously enterprise-y organizations where you want to be able to do things like drop-in replacements of one class for another by changing a single line in a configuration file, are utterly wasted on a trivial benchmark like this.

    --
    There's no place I could be, since I've found Serenity...
  23. Re:are they serious right now? by Mathematiker · · Score: 2

    Dude. Open Office is written in C++. It has some plug-ins written in java, but the main bloat is C++.

  24. Real World benchmark by NecroMancer · · Score: 2

    I was really expecting a "real" real world test.

    I would like to see a head to head between, for example, WebLogic Server with Oracle DB vs. .NET IIS with SQL Server.

    The test as is, IMHO, is crap.

  25. Neither by borgasm · · Score: 2

    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.

  26. Re:Start your weighed down engines by cbhacking · · Score: 2

    Good thing neither of the languages being discussed is in any way interpreted, or has been for a decade or so (actually, never in the official C#/.NET distribution).

    But it's OK, I'm sure that somewhere under that mouth froth you actually know what you're talking about on some subject or other. Just keep searching, you'll find it eventually.

    --
    There's no place I could be, since I've found Serenity...
  27. Re:Aspects... by burisch_research · · Score: 3, Insightful

    Um, no. You could probably write an entire office suite in perl and have it fit onto a few small pieces of paper when printed out; but nobody would ever understand it, probably not even the person who wrote it in the first place!

    --
    char*f="char*f=%c%s%c;main(){printf(f,34,f,34);}";main(){printf(f,34,f,34);}
  28. Judging a language by outcomes by WaffleMonster · · Score: 2

    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.

  29. fast enough, for you, old man. by Anonymous Coward · · Score: 2, Insightful

    I can't speak to C#. But I've written code for a financial exchange in Java with p50 response times around 100 microseconds. p99's are tricker but were still sub millisecond (mostly due to the GC, however we were moving toward zero GC's). Having said that, most developers who write Java would have balked at the unsavory things we had to do to achieve that speed.

    I believe we undervalue the effect of the culture associated with languages. My experience is a lot of Java code is utter crap because the community is self reinforcing of bad ideas. I suspect that competent and motivated developers can take either Java or C# or C++ or whatever and make them fast.

    I think in the end the system should have written the critical path in C as it has the right level of abstraction needed for low latency. Java or any other relatively high level language is great for supporting systems.

  30. Re:Caching by shutdown+-p+now · · Score: 3, Interesting

    At which point, you have two choices: use a compiled language, or use an interpreted byte code language like Java or C#.

    Neither Java nor C# are interpreted on heavy loads, they both JIT-compile, and they both have options (third-party) to compile to native code ahead of time.

    The difference in performance between C++ and Java/C# has nothing to do with bytecode, and everything with their semantics. Their object model requires a GC - that's extra overhead. Their arrays are always bounds-checked - overhead. Class instances are always allocated on the heap (except for C# structs, which are rather limited in what they can do) - overhead. And so on.

  31. Re:The same language by shutdown+-p+now · · Score: 2

    They used to be mostly the same language, but that was somewhere circa 1.0. C# has developed much faster since then, and has a lot of things that have no direct equivalent in Java, like yield, lambdas, LINQ, dynamic or async/await.

  32. Duh. by wcrowe · · Score: 3, Insightful

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

    --
    Proverbs 21:19