Java/C++ performance
<p>Hello guys
I've started learning Java and I've heard something about it's slowness. For an experiment I wrote two programms in C++ and Java which seem to be equal</p>

<pre><code>import java.util.*;

class Java {
  public static void main(String args[]) {
    long beg = System.currentTimeMillis();
    for (int i = 0; i &lt; 200000000; ++i) { }
    long end = System.currentTimeMillis();
    System.out.println(end - beg);
  }
}
</code></pre>

<p>outputs 334</p>

<pre><code>#include &lt;cstdio&gt;
#include &lt;ctime&gt;

int main() {
      double beg = clock();
      for (int i = 0; i &lt; 200000000; ++i) { }
      double end = clock();
      printf("%f\n", (end - beg) / double(CLOCKS_PER_SEC) / 1000.0);
      return 0;
}
</code></pre>

<p>outputs 0.000810</p>

<p>I am a little confused. Is Java really that slow or I'm doing something wrong?</p>
