none
Code slower in release mode..?

    คำถาม

  • I recently re-wrote a binary file format library, since my old version was so terribly coded. My new library has proven to be twice as fast according to dotTrace and ANTS.

    But it's strange. I'll measure performance with the Stopwatch and its much, much slower than dotTrace and ANTS says it is.

    What's even more strange, is that I realized that the DEBUG build of my testing application (console app that just creates a new file with my library) is FASTER than the release build! 

    Testing with the Stopwatch class, the debug build runs at 00::00::00.042 on average. In the release build, it runs at 00::00::00.083 on average.

    Does anyone know why this might be happening?

    Thanks,

    Alex

    10 พฤษภาคม 2555 22:41

คำตอบ

  • Ahmed, nope, not running from Visual Studio, either.

    Thanks everyone for your help, regardless! I was able to chip the time down to 00::00::00.070, which I'm alright with. Not as fast as my C++ counterpart, but I'm pleased nevertheless. Thank you all for your help!

    -Alex

    • ทำเครื่องหมายเป็นคำตอบโดย -Alex 11 พฤษภาคม 2555 22:29
    11 พฤษภาคม 2555 22:28

ตอบทั้งหมด