Changeset bd6e226


Ignore:
Timestamp:
May 15, 2018, 4:19:11 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
099e202
Parents:
2e5fa345
Message:

Update documentation for AssertCompare?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/TypeEnvironment.h

    r2e5fa345 rbd6e226  
    3737        //
    3838        // I've seen a TU go from 54 minutes to 1 minute 34 seconds with the addition of this comparator.
     39        //
     40        // Note: since this compares pointers for position, minor changes in the source file that affect
     41        // memory layout can alter compilation time in unpredictable ways. For example, the placement
     42        // of a line directive can reorder type pointers with respect to each other so that assertions
     43        // are seen in different orders, causing a potentially different number of unification calls when
     44        // resolving assertions. I've seen a TU go from 36 seconds to 27 seconds by reordering line directives
     45        // alone, so it would be nice to fix this comparison so that assertions compare more consistently.
     46        // I've tried to modify this to compare on mangle name instead of type as the second comparator, but
     47        // this causes some assertions to never be recorded. More investigation is needed.
    3948        struct AssertCompare {
    4049                bool operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) const {
Note: See TracChangeset for help on using the changeset viewer.