|
|
вернуться в форумОбщий форумTo Admins: About the C/C++ Compiler I found an amazing fact about the compiler. My code (when compiled using c++ compiler) runs in 0.001 second, and when I compile it using C compiler runs in 0.015 second, and the use the same memory. So why should someone use the C compiler? (Also, I heard that C codes, run faster than C++ ones) 2234052 17:25:47 17 Sep 2008 Seyyed Mehran Kholdi (HalfBloodCoder) 1087 C++ Accepted 0.001 149 KB 2234051 17:25:37 17 Sep 2008 Seyyed Mehran Kholdi (HalfBloodCoder) 1087 C Accepted 0.015 149 KB Re: To Admins: About the C/C++ Compiler Submit it around 10 times and you'll see that execution time is different. Cache hits, concurrent compilations/tests, etc... All of this has effect. AFAIK, I even saw different memory consumption (within a few KB) for the same code submitted several times. Re: To Admins: About the C/C++ Compiler I had many other experiences, but the same result. even I tested it on another problems. as you can see: 2236738 17:43:35 19 Sep 2008 Seyyed Mehran Kholdi (HalfBloodCoder) 1260 C++ Accepted 0.001 141 KB 2236737 17:43:25 19 Sep 2008 Seyyed Mehran Kholdi (HalfBloodCoder) 1260 C Accepted 0.015 141 KB Again, another weakness in the C compiler. I guess the optimizer (compiler) does not work well for C |
|
|