C# beats Java in 9 out of 10 benchmarks (benchmarks game)

  • Not sure what the output of Java Mandelbrot supposed to produce - it really does a number on the terminal.

    Anyway, the original version spends half of it's time writing to stdout, verify by replacing

        OutputStream stream = new BufferedOutputStream(System.out);
    
    with

        OutputStream stream = new BufferedOutputStream(new FileOutputStream("./mandel_out"));	
    
    The time can be cut in half again by not using AtomicInteger (it is heavily contended) and having every thread operate on it's own chunk of the out array without any synchronization.