Title | SegCheck slow in hot variety |
Status | closed |
Priority | nice |
Assigned user | David Lovemore |
Organization | Ravenbrook |
Description | SegCheck gets called a lot, and is slow even in the hot variety. |
Analysis | SegCheck ought to compile down to just a signature check, but it contains a loop over tracts of the segment that doesn't get compiled out (on windows) (even though the body does get compiled out) and dominates the run-time of the function. SegCheck contributes to about 1% of the run-time when measured on CET on the HOT variety. I think the sensible thing is to only include the loop if CHECKLEVEL > CheckLevelMINIMAL This seems to produce a 1% speed up. |
How found | unknown |
Evidence | Profiling CET. |
Created by | David Lovemore |
Created on | 2014-04-30 16:29:06 |
Last modified by | Gareth Rees |
Last modified on | 2014-05-10 09:44:25 |
History | 2014-04-30 DL Created 2014-05-06 DL Added solution to analysis |
Change | Effect | Date | User | Description |
---|---|---|---|---|
185992 | closed | 2014-05-10 09:44:25 | Gareth Rees | Fix compilation of seg.c. 1. "#ifdef CHECKLEVEL > CheckLevelMINIMAL" was bogus: the #ifdef should have been #if, but even then it would not be right, because in the CHECKLEVEL_DYNAMIC configuration, CHECKLEVEL is a variable rather than a preprocessor constant. So use the condition defined(AVER_AND_CHECK_ALL) instead. 2. The final CHECKL(addr == seg->limit) only makes sense if the loop was executed. 3. The variables used by the loop need to be inside the #if to avoid warnings about unused variables. 4. Add reference to the job from a comment. |
185971 | closed | 2014-05-06 12:19:06 | David Lovemore | Only include tract loop ion SegCheck when check level > minimal. This is to speed up SegCheck in HOT variety. |