Unbiased Java versus C# comparison

I found this feature-by-feature, unbiased and informatve Java versus C# comparison, and thought that perhaps a few of you may be interested in it:
http://www.prism.gatech.edu/~gte855q/CsharpVsJava.html
Every comparison that I've read up to this point has either been written by Java or MS evangelists, and this one is definitely refreshing break from the typical essay.

Agreed. However, the decision may generalize even further in many cases, and become "Industry supported platform of technologies (Java) or Microsoft proprietarization (.NET)." I still have not seen an unbiased comparison of the platforms, rather than languages, that goes as in depth as this one... if anybody else has, I'd love to see a link to it?
For those that will be using both technologies, such as myself, this paper helps bridge the language gaps between the two and make transitioning simple. It's more helpful at the post-decision (to use .NET) level, rather than pre-decision.

Similar Messages

  • Python vs Java - simple benchmark comparison

    Hi all,
    I recently posted a speed comparison of Python vs Java.
    Following Xentac's suggestion, I imported Psyco to see if I could get any JIT benefits in the Python scripts. I then tried the latested Java JDK6 dev binaries too. This follow-up can be found here.
    Please be aware that I'm totally aware of the vast limitations of micro-benchmarks like these. Still, although they are based on someone else's code, I like them because they represent the typical tasks I often carry out in both my Python and Java programming: IO, lists, hashes, for loops, etc.
    Any comments welcome, especially on how to optimise the Python code. I can already see a couple of ways that ought to improve the Java tests.

    I agree. I honestly am not trying to say that Java is better and Python is rubbish. I love em both. There's not a great deal of difference for the most part.
    I just felt that people assumed that Java was slow because they've heard it's slow, or had prior experience of the old versions.
    I have friend's saying "ugh, Java is sloowwww." And so avoid it. Yet, these same people rave about Perl and Python apps. My point was simply, hate Java for other reasons - not speed!
    You may notice that the Java executable is only 63K. The bulk of Java comes from its extensive class library that ships with the runtime. People think that Java must load up all the classes or something before running, when in fact it only ever loads with it needs. So, whilst the package itself is large, any sure, it does require more memory than other languages, I just don't believe it's as bulky as some assume.
    The motivation for those benchmarks was a comment on Frugalware's IRC channel where someone tried it out, said it was slow, removed it, and preferred the Python/gtk front-end they have instead. Followed with some insightful remark that Java only for web apps! I don't mind others prefering other front-ends. But is Jacman really slow? Please tell me, because it runs like a dream on my system. It would go even quicker if with pacman-optimize.

  • Article on Performance of Java versus C++

    http://java.about.com/gi/dynamic/offsite.htm?site=http://www.idiom.com/%257Ezilla/Computer/javaCbenchmark.html

    Seems like a relatively unbiased evaluation.

  • Java versus PL/SQL Stored Procedure Issues

    I am getting a result that is 30 times slower for Java when compared with PLSQL. Can you tell me if that is normal or am I missing something?
    Thanks in advance for your help,
    Gaurav Pal
    Java Developer,
    SCJP 1.1, SCJP 2, SCJD 2
    Timing results
    ---------------- Java ------------------------
    Total Time taken for 10 calls: 4667
    Result: 466 Time: 466
    ---------------- PLSQL ------------------------
    Total Time taken for 10 calls: 150
    Result: 466 Time: 15
    Java Code
    public static int getCursorCount()
    int count = 0;
    //define iterator for select
    count_iter myIter = null;
    try
    #sql myIter = { SELECT lastname FROM employee };
    while(myIter.next())
    count++;
    myIter.close();
    catch(SQLException excp)
    return count;
    PL/SQL Code
    function get_count_cursor_sf
    return
    number
    is
    cursor count_cursor is
    select lastname from employee;
    v_return_count number := 0;
    v_name employee.lastname%type;
    begin
    open count_cursor;
    fetch count_cursor into v_name;
    while (count_cursor%found) loop
    fetch count_cursor into v_name;
    v_return_count := v_return_count + 1;
    end loop;
    --Return the variable
    return v_return_count;
    end ;
    Calling Code
    public class DBCall
    public static void main(String args[])
    try
    makeJavaCalls();
    makePLSQLCalls();
    catch(Exception excp)
    excp.printStackTrace();
    public static Connection getConnection() throws Exception
    Class.forName("oracle.jdbc.driver.OracleDriver");
    return DriverManager.getConnection("jdbc:oracle:thin:@10.0.0.3:1521:oracleee","rda","rdauser");
    public static void makePLSQLCalls() throws Exception
    int count = 10;
    long time = 0;
    int result = 0;
    while(count > 0)
    Connection conn = getConnection();
    CallableStatement cs = conn.prepareCall("{? = call rda_plsql_pkg.get_count_cursor_sf()}");
    cs.registerOutParameter(1, Types.INTEGER);
    long before = System.currentTimeMillis();
    cs.execute();
    result = cs.getInt(1);
    long after = System.currentTimeMillis();
    time = time + (after - before);
    cs.close();
    conn.close();
    count--;
    System.out.println("---------------- PLSQL ------------------------");
    System.out.println("Total Time taken for 10 calls: " + time);
    System.out.println("Result: " + result + " Time: " + (time/10));
    public static void makeJavaCalls() throws Exception
    int count = 10;
    long time = 0;
    int result = 0;
    while(count > 0)
    Connection conn = getConnection();
    CallableStatement cs = conn.prepareCall("{? = call dorknight.getcursorcount()}");
    cs.registerOutParameter(1, Types.INTEGER);
    long before = System.currentTimeMillis();
    cs.execute();
    result = cs.getInt(1);
    long after = System.currentTimeMillis();
    time = time + (after - before);
    cs.close();
    conn.close();
    count--;
    System.out.println("---------------- Java ------------------------");
    System.out.println("Total Time taken for 10 calls: " + time);
    System.out.println("Result: " + result + " Time: " + (time/10));
    null

    A big contributor to the behavior seen here is that there is a one-time overhead per session (= per database connection) to start the JavaVM and also (in 8.1.6 and earlier) to initialize the SQLJ runtime (via reflection).
    Keeping the same connection for subsequent calls to Java (which is the more typical scenario, anyway) will result in a rather considerable speedup.

  • Java versus j#: will java die?

    Hi there,
    Someone got a look in this article?
    http://www.winnetmag.com/Article/ArticleID/19379/19379
    Will Java die!?
    Thnx. Thom

    Yep. It's already dead, in fact. No companies are
    doing any Java development anymore, and there's aHUGE
    demand for J# developers as all the big players are
    doing 100% across the board conversion.
    You may notice the date on that article is 4 years
    ago. Why do you think the economy has been so lousy
    since around that time? It's because nobody's
    producing anything, or doing any R&D. All effortsare
    focussed on J#. It's bigger than Y2K.
    </sarcasm>Hey, where's you opening tag?
    I gots yer opening tag right here pal!
    </belligerence>

  • Java versus javac classpath

    hi everyone:
    this is a bit embarassing, as I have been using java for some time, but I recently came across a classpath conceptual difficulty.
    My understanding was that 'javac' uses classpath to find the path to any classes referenced in a target for compilation. However, I couldn't come up with any concrete rationale for using an additional classpath for 'java', the JVM command, when developing your own applications (I can see its importance for third party classes).
    Doesn't javac encode the classpath passed to it in the compiled class file itself? (I figured this because even if I do not specify a classpath to the 'java', the program still executes fine). If this is true, then the only way I see the 'java' classpath being useful is if you were to change around the location of the class files after compilation.
    Any thoughts would be greatly appreciated.

    Btw, there is no distiction between java and javac
    classpaths. They're both the classpath.only difference i see there could be, is that, for
    javac you tell the path to your .java file that
    need's to be compiled, and for java you tell the name
    of class whose main() method it should run (or you
    tell which .jar file to execute)That's not relevant here. Classpath is used the same way for both of them. Classpath has nothing to do with finding a .java file to compile.
    The only difference, I think, is that I think by default, the directory holding the package root of any .java file given as an arg to javac is implicitly added to the classpath. I'm not sure about that though.
    >
    so in some cases you would need to include "." in
    your classpath for execution, but would not need to
    include it for compilation.
    just my 2 cents

  • Java versus different explorers

    Hi
    I was told that I shouldn't use Java Interface on Internet, because I would run into troubles. The display would vary completely from one explorer to another, e.g. a user using netscape and another user internet explorer. For this reason, all our interfaces should be in HTML, and on our side server java.
    I was also told that 90% of the companies in the UK would refuse to enable Java for their employees and download an application. That companies would not allow it either on their corporate intranet. My question is then, in order to generate html pages for a corporate intranet user, would not i need an application to able to generate those pages?
    could someone help me
    many thanks

    The Java interface will not differ in IE and Netscape.But the applets has to be downloaded on the client side which takes more time.And there are some security issues which are disadvantages for applets.ofcourse, that depends on your application.
    There is no need for you to write an application to display html pages.The application server will take care of that.It is better for you to have the view as either JSP or HTML and use servlets ,beans as the background for your application to achieve the logic.
    Hi
    I was told that I shouldn't use Java Interface on
    Internet, because I would run into troubles. The
    display would vary completely from one explorer to
    another, e.g. a user using netscape and another user
    internet explorer. For this reason, all our interfaces
    should be in HTML, and on our side server java.
    I was also told that 90% of the companies in the UK
    would refuse to enable Java for their employees and
    download an application. That companies would not
    allow it either on their corporate intranet. My
    question is then, in order to generate html pages for
    a corporate intranet user, would not i need an
    application to able to generate those pages?
    could someone help me
    many thanks

  • Java versus C#

    This is in fact a follow up to the thread about native exe compilation for Java.
    The main issue is how to make a sensible Java deployment on the Windows platform. The thread concluded we need a native exe tool to make this work in real life.
    Many interesting points were made here, but Sun has yet to respond to this, except with a very unwilling attitude to the subject in general.
    Have a look here for details:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=166500
    My own conclusion to Suns ignorance of the importance of the subject is to investigate how C# compares to Java, and see if the language offers better qualities.
    I am aware that I might be cursing in the church here, but I believe it is better to talk freely about the problem of Java deployment in Windows, and if Sun does not provide us with competetive alternatives it is sensible to look around for other solutions. C# is right around the corner, and we should have a close look at it, either as an alternative to Java or as an investigation of the competition it provides.
    This thread is ment for people who likes Java as a language, but are interested in the mass market represented by the vast number of Windows platforms out there, and in this case C# is a real alternative. So please dont flame me with portability issues.
    Ok, enough apologies made in advance :-)
    Allright, my first question when turning to C# is how well does it compare to Java when it comes to execution speed. I found the following benchmark based on the Visual Studio beta 1:
    These tests are run on a Pentium II 350 with 128 MB RAM, looking for a
    solution at depth 7.
    Java applet (Internet Explorer 5.5)
    =========================
    925,000 positions per second
    Java applet (Symantec Visual Caf� JIT)
    =============================
    950,000 positions per second
    Executable (Converted applet to native code
    with JET, see http://www.excelsior-usa.com/jetdl.html )
    ==========================================
    1,300,000 positions per second
    C# executable (Visual Studio .NET Beta 1)
    ================================
    757,000 positions per second (debug: 330,000 pps.)
    In indices:
    C# 1
    Java IE5.5 1.22
    Java Symantec 1.25
    JET compiled 1.71
    The "benchmarking" applet used can be found here:
    http://www.speedcubing.com/CubeSolver/CubeSolver.html
    This is not completely accurate, but gives a clear indication.
    As you can see C# is considerably slower than Java, and in fact it also uses a JIT technology slowing down the startup process of your C# application, this is the same technology Java also suffers from.
    It is possible to compile a C# program into an native code executable, however it will in fact perform around 5% SLOWER than the JIT compiled program for some reason.
    My further investigations of the execution speed had me discover that the GUI library of C# is much faster than that of Java AWT and SWING. This means that the lower actual performance in C# might not be visible to the user, as the GUI will respond quickly. Perceived performance is much more important than actual performance.
    Other important issues are:
    - What is Microsofts deployment strategy for .net?
    - When will C# be able to run on users computers in practice?
    - What kind of overhead is needed to deploy a C# program
    - Does anyone have details about JUMP to .net (the Java to C# conversion tool)?
    - Is C# fully compatible with popular libraries like DirectX?
    - Will it be possible to run C# in a browser, like Java applets can?
    Does anyone have more info or views on these topics?

    I don't think (quote me if I'm wrong) that C# has the cross-platform compatability that Java does. Don't get me wrong I'm not an advocate of either, actually I use both languages seperately and together to meet the needs of different applications. There are small and large differences in the way different compilers on diferent platforms and architectures work. Just try compiling and/or running a windows application to read from the parallel port on a unix machine. The fact that Sun leaves it up to you to handle the method of execution is one of the reasons that Java is so portable,scalable
    and platform independent. So, if you are just going to be writing applications for a single platform then maybe C#/C++ is what is right for you. But, the people who are not pledging their allegiance to Microsoft have seen how frustrating just compiling a C# program is if you do not have the exact library versions and compiler.
    P.S. Good story/point.
    --Ian                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

  • Brainstorming imported Archives (JAVA) versus Z-TABLEs (ABAP)

    Hi everybody,
    we got very complex processes and I would like to ease them:
    Instead of fixedValues in Message-Mapping we use CSV-files and store them in the imported archives.
    In different message-mappings we read the CSVs via UDF.
    The problem is that the CSV get often updated by the R/3-agents. So we have a lot of administrative work to communicate with the agents, import the files, transport and so on.
    Thats the reason I am thinking of creating z-tables where the agents can maintain the values instead of updating the CSV. Also the agents would be able to transport the z-table entries.
    But as the z-tables are resided on the ABAP-stack we would have change our graphical message mappings to ABAP-Mappings. This would be to much work for us and is not practicable.
    Do you see a workaround or a best practice I do not see?
    Thanks Regards
    Mario

    Hi,
    Instead of doing all this work, you can do in simple
    Use RFC LOOKUp in XI Mapping to pull the values based on the input value and Maintain the ZTable in ABAP Stack of XI or in R/3 itself.
    RFC Lookups
    The specified item was not found.
    Use this crazy piece for any RFC Mapping Lookups!
    REgards
    Seshagiri

  • BSP / Web-Dynpro (Java / Abap)  what to use in this case ?

    Hi all,
    i have some questions about all this BSP/Web-Dynpro stuff. We have an application (for health care written in Visual Studio) out there at our customers. Some of these customers are using SAP as their backend system. So we've writte some backend functionality (a cash processing, additional reports, a special invoice system etc.etc.) in Abap and Abap-Objects. Actually we are planing a new release for this backend stuff which is using the normal SAP Gui.
    Maybe we plan for the next release to convert our app to a Web based app and we discuss what SAP technology we should use for that.
    Here are my questions :
    - When and why should we use Web-Dynpro (Java) ?
    - Can't we use BSP ?
    - Is there any future for BSP ?
    - When will Web-Dynpro for ABAP be released (actually we are not a Java Shop so Abap is prefered)?
    Hope someone can answer my question.
    Greetings
    Henning

    If you don't mind, I am going to terminate discussion of Web Dynpro ABAP here. It is not that I want to, but we are in a difficult position with this development, and can not really discuss it too much.
    But, let me first make a few (last) comments:
    (*) BSP is available since WebAS 610 (which is now nearly at the end of its lifetime). WebAS 620 is the main platform out there, with NW04 (WebAS 640) now shipping, and the next product is inevitably coming. If you keep in mind that SAP supports each release at least 7 years, and we will be shipping BSP in an upcoming release, you can see that with BSP you are not going to left stranded for many years to come.
    (*) Web Dynpro Java is out and shipping. A very nice development environment. You can build nice things with it.
    (*) Web Dynpro ABAP: it will become a very nice product as well. We should know :). But, it will definitely not ship on NW04 platform. Which unfortunately means the next great NW shipment (both naming and date is not available).
    From our experience, most people seem to make their decisions based on the available Java versus ABAP skills in the shop. However, the other factor to look at is also "pixel perfect" rendering. Only with BSP can you influence the rendering. Web Dynpro is more a development platform for business applications, and as such they must conform to the designated model/concepts, etc.
    brian

  • Java.lang no class found error please help

    Please can anyone help me to once and for all solve this problem.
    I'm using win2k.
    jdk1.3.1_01 and apache tomcat 4.0
    i can compile but i can't execute any code.
    when i try to compile servlet code i get the httpservletpackage does not exist.
    regular java code compiles just fine.
    The error message below i get whever i try to execute any code.
    ------- java ----------
    java.lang.NoClassDefFoundError: Comparison
    Exception in thread "main" Normal Termination
    Output completed (1 sec consumed).
    This is my CLASSPATH: c:\javax\;c:\unzipped\servlet-2_3-fcs-classfiles\;c:\java;c:\jdk1.3.1_01\server.jar;c:\Apache Tomcat\lib\servlet.jar
    My PATH is: c:Apache Tomcat 4.0\common\lib;c:\jdk1.3.1_01\bin;
    JAVA_HOME c:\jdk1.3.1_01
    TOMCAT_HOME c:\Apache Tomcat 4.0

    under DOS, navigate to your current directory that contains the java file you want to compile.
    Do the following
    1) type in: set classpath=.
    (Including the period after the equals sign!)
    2) then compile as normal.
    This should work.

  • Comparison Program

    I am trying to write a program that reads 5 integers and displays the highest and lowest integers typed in. We are only supposed to use the ideas of variables and comparison operators. The way I figured does this is create a variable named maxVar and keep reassigning it if some other variable ends up being larger. What am I doing wrong. I am new to java
    public class Comparison
    public static void main( String args[] )
             { // start main method
          Scanner input = new Scanner( System.in );
            int number1; // first number to compare
            int number2; // second number to compare
            int number3; // third number to compare
            int number4; // fourth number to compare
            int number5; // fifth number to compare
            int maxVar = 0; // This is the MaxValue
            System.out.print( "Enter First Integer: " );
            number1 = input.nextInt();
            System.out.print( "Eneter Second Integer: " );
            number2 = input.nextInt();
            System.out.print( "Enter Third Integer: " );
            number3 = input.nextInt();
            System.out.print( "Enter Fourth Integer: " );
            number4 = input.nextInt();
            System.out.print( "Enter Fifth Integer: " );
            number5 = input.nextInt();
            if ( number1 <= number2 )
                    number2 = maxVar;
            if ( number1 > number2)
                    number1 = maxVar;
            if ( number3 >= maxVar )
                    number3 = maxVar;
           if ( number4 >=  maxVar )
                    number4 = maxVar;
            if ( number5 >=  maxVar )
                    number5 = maxVar;
            System.out.print( " The maximum Integer You Entered Was:"  );
            System.out.printf("%d /n", maxVar );
            } // end method main
    } // end class Comparison

    What is wrong with the answers you got in your other thread?
    http://forum.java.sun.com/thread.jspa?threadID=764850&messageID=4362380#4362380

  • Please I'm new to java.Can anyone help me?

    Whenever i try to execute a java program
    at the command line I get the error message " .classfiles not found.I checked in my directory and the classfiles are there.I made sure I'm in the directory when i'm trying to execute the .class files.
    when i use EditPlus i get the error message of
    ---------- java ----------
    java.lang.NoClassDefFoundError: Comparison
    Exception in thread "main" Normal Termination
    Output completed (1 sec consumed).
    Can anyone tell what i'm doing wrong or what i'm not doing?

    From Julesh1
    To: DaithiMcGibon and ehsan java
    Thank you very much i added the ";." and now i can execute the any code.
    Your assistance is greatly appreciated.
    I'm using windows 2000 Pro; jdk1.3.1_01; and apache tomcat 4.0.
    But whenever i try to start apache tomcat i get a number of errors.
    I have copied these errors from the command windows and pasted them below because i don't know where to begin.Does anyone think i should reinstall apache tomcat 4.0
    Please take a look, here below are the error messages i'm getting.
    A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in :
    'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method.
    Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
    Catalina.start: LifecycleException: null.open: java.net.BindException: Address in use: bind
    LifecycleException: null.open: java.net.BindException: Address in use: bind
    at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1116)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java, Compiled Code)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.java, Compiled Code)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)
    ----- Root Cause -----
    java.net.BindException: Address in use: bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:118)
    at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.java:946)
    at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1114)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java, Compiled Code)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.java, Compiled Code)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)

  • Changing from C/Unix to Java

    Hello,
    i have done core java during College days, to say about 3-4 Years ago.
    i am currently working on C, Unix and ProC.
    I need a change from development perspective. I have done some projects on C++ as well, including STL. but that was again, about a year ago. I have done more projects in C++ than java.
    Now, im looking for a change in my work. So, whether to go back to C++, or java, is a bit of a confusion for me.
    Will need some consultation here please. ie from self development, Work, and market point of view.

    http://www.google.com/search?num=100&hl=en&lr=lang_en&c2coff=1&q=java+versus+c%2B%2B+site%3Aforum.java.sun.com

  • What is the difference between RFDM3000 and RFDM4000?

    Our understanding is that the RFDM4000 is a proposal that set ups items to have the RFDM300 to create the dispute. Is that correct?  With that said, would the posting keys have to be identical on each variantin each program to have all items post that have been selected in the proposal?

    HSRP Versus VRRP Comparison Table
    HSRP
    VRRP
    Propietary
    Standards based
    RFC 2281
    RFC 3768
    Separate IP Address needed for the Virtual
    Can use the physical IP Address of the Virtual, if needed, saving IP space.
    One Master, One Standby, all others are listening
    One Master, all other routers are backup
    More familiar to most network engineers
    Less familiar - yet very similar
    Can track an interface for failover
    Can track an interface for failover (depending on operating system and version, it can also track the reachability of an IP address)
    All HSRP routers use multicast hello packets to 224.0.0.2 (all routers) for version 1 or 224.0.0.102 for version 2.
    All VRRP routers use IP protcol number 112 (vrrp) to communicate via multicast IP address 224.0.0.18
    All virtual router must use MAC address 0000.0c07.acXX where XX is the group ID.
    All virtual routers must use 00-00-5E-00-01-XX as its Media Access Control (MAC) address

Maybe you are looking for