delorie.com/djgpp/faq/profiling/not-faster.html   search  
I've found the routine which takes 99% of the running time and made it 20 times faster. Now gprof indeed tells me that routine runs much faster, but my program still takes almost the same total time to run...

Does your program use I/O extensively? gprof can only see those parts of your program which run in protected mode. When you access the disk, the CPU is switched to real mode for the time the disk is accessed. If your program does this a lot, its elapsed time is governed by the real-mode disk operations which gprof cannot see.

You can put topline into your GO32 environment variable to see how much time does your program spend in real mode. Look at the R and P letters at the leftmost corner: R means real mode.

  webmaster     delorie software   privacy  
  Copyright © 1995     Updated Feb 1995