Date: Sat, 22 Oct 94 21:11:49 JST From: Stephen Turnbull To: OKRA AT max DOT tiac DOT net Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: C++ compile speed tips? Given the fact that the C++ compiler seems to crash every time I misspell something (quite often, in other words) and the fact that Use a spell-checker, seriously. Try to find one where you can create your own main dictionary, which would only have C++ reserved words in it. Probably it's too much work, but it's a serious suggestion. Write your own "spell-checker". Borrow the token parser from GCC. Or from lint, there must be a C++ lint, which would do the job, and if not, you could use that. I only have 4MB RAM and it's swapping almost continuously, trying to compile a program is getting to be very difficult. It will take a minute and a half to get to line 150 (after going through 500 In this case, going to the logically minimum-sized header and source files might make sense (one class per header file, one function per source file). By using make, you can bypass the compilation of previously successful sources. If you have a 150 line function, it's too big. lines of #includes or so) and then give me one or two errors and crash. I fix those errors and then it takes another minute and a half to find the next two. At first I was just accepting this, but after 15 compiles or so it gets REALLY tedious. I've tried moving as much as I can from headers into the corresponding source files, but some stuff just has to stay in the header. I don't think this is going to save much time. The include'ing itself is done in a So, since it would seem that most of the time is spent swapping, So, siI'm wondering if perhaps increasing SmartDrive's cache size would help. Changing from gcc to gccrm helped some - from 2:15 minutes to 1:40 minutes (and I used to complain that the C compiler took 20 seconds!). I don't have any TSR's I'd be willing to give up (I've already made the biggest one unload and then reload at the beginning and end of my compile batch file). Does anybody have any speed tips for those of us who are still running a 486sx25 with 4MB ram? :) I've exhausted all the possiblities I can think of. Kim You might want to go to an older version of the C++ compiler; they were more stable at least in parsing. They were seriously less featureful, but you probably are using templates and suchlike much yet. I don't know if you'd need to change other components of the compiler suite. DJGPP versions 1.10 and 1.11 are still available on QDECK.COM, in /pub/djgpp or /pub/tools/djgpp or something like that. The speed thing is a perennial question; look in the list archives. --Steve