delorie.com/djgpp/faq/performance/slow-app.html | search |
Explore the following possible causes for this:
You can tell how much your program switches to real mode by using the topline parameter in the GO32 environment variable. If the leftmost symbol is usually P, you are not a victim of the mode switch. If it shows R a large proportion of time, try rewriting your program to minimize use of those functions which require a mode switch, even at a price of more computation (mode switch usually eats up many tens of CPU cycles).
If this is the case, you will see those functions as hot spots on the program histogram produced by the gprof profiler. If you find this to be the problem, write your own, optimized versions of those functions. It's best to write those as inline assembly functions, for maximum performance. If you find library functions which are inefficient, please inform the djgpp mailing list, so this could be fixed by people who maintain the library.
prev next webmaster | delorie software privacy |
Copyright © 1995 | Updated Feb 1995 |