Date: Sun, 3 Apr 1994 13:18:19 +0200 From: terra AT diku DOT dk To: stevev AT miser DOT uoregon DOT edu Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: DJGPP Speed Date: Wed, 30 Mar 94 09:57:06 PST From: stevev AT miser DOT uoregon DOT edu (Steve VanDevender) terra AT diku DOT dk writes: > I think we could improve the speed of all djgpp programs a lot by making > structures and procedures in go32 aligned properly. As it is now, every- > thing is byte aligned and should be: Aligning those structures might slightly improve the speed of DOS calls through go32 but I doubt this would make much visible difference. Actually, we would see a speed improvement on all interrupts occuring while the processor is in protected mode, e.g., the timer interrupt and the page fault exception. At least two task switches are involved with every such interrupt. I did some optimizations on a crypt(1) implementation once and found that proper alignment could speed up things by 20%. This particular program referenced memory a *lot* of the time (90% of all instructions accessed double words) so 20% is probably an upper bound. What aligning would amount to in the gcc case is rather difficult to say in advance, though. I would only expect a few percent. Since it is rather easy to do, I figure it would be worth the while. Morten Welinder terra AT diku DOT dk