On Wed, 2007-09-19 at 17:51 +0200, pgeorges wrote: > > Crosswords, compiled with cegcc, runs noticably slower than compiled > > with the m$ compiler. Eric House also reported this. I've not > > investigated this yet. We may have inefficiencies other than the code > > generated by the compiler. Something with the coredll perhaps ? > > > > Danny > > > Is it possible to know in which cases the slowdowns are encountered ? > CPU intensive code, I/O , system calls ? > What is the amount of slow down ? 10 % , 50 % ? > > Pascal
I don't have an eVC4 installed (only my children have Windows PC's) so I have no simple way to do comparisons. Xwords shows a noticable difference if you get it to refresh its screen. (It's a scrabble game application.) When compiled with cegcc, you can see how it draws the game board - takes one or 1.5 seconds. With the executable as you can download it from http://xwords.sf.net , the redraw is instantaneous. So that example could lead you to the conclusion that it's either graphics or system (DLL?) access. To know more, it probably takes only a couple of simple programs that do something silly 10000 times and measure the elapsed time. An example of such a program is attached, along with its output. Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <windows.h> // #include <mmsystem.h> int main(int argc, char *argv[]) { FILE *f; // MMTIME mmt; // MMRESULT mmr; float n; int i; DWORD w1, w2; f = fopen("/storage card/devel/float.txt", "w"); if (f == 0) { return -1; } #if 0 if (timeGetSystemTime(&mmt, sizeof(mmt)) == TIMERR_NOERROR) { fprintf(f, "No error\r\n"); } else { } #endif w1 = timeGetTime(); fprintf(f, "Time is %ld\r\n", w1); for (n = w1, i=0; i<30000; i++) { n = n * 0.34 + 3.1; } w2 = timeGetTime(); fprintf(f, "Time is %ld\r\n", w2); fprintf(f, "Difference : %ld\r\n", w2 - w1); fclose(f); return 0; }
Time is 11963595 Time is 11963634 Difference : 39
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel