Changeset 154


Ignore:
Timestamp:
May 22, 2008, 6:10:17 PM (11 years ago)
Author:
lindanl
Message:

Performance test definitions.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/markup_stats.cxx

    r152 r154  
    3434#define NAME_LOOKUP 4
    3535
    36 #define OMISSION NAME_LOOKUP
     36#define OMISSION END_TAG_MATCHING
    3737
    3838
     
    492492        print_stats("empty element", empty_elem_count, empty_elem_length);
    493493        print_stats("start tag", start_tag_count, start_tag_length);
    494         printf("%i total attributes\n", attribute_count);
     494        printf("%i total attributes\n", total_attribute_count);
    495495        print_stats("attribute name", total_attribute_count, total_att_name_length);
    496496        print_stats("attribute value", total_attribute_count, total_att_value_length);
  • trunk/src/engine.c

    r151 r154  
    641641
    642642#if (not defined(OMISSION)) or ((OMISSION != END_TAG_MATCHING)  and (OMISSION != NAME_LOOKUP))
     643printf("WF_EndTag\n");
    643644        char * start_elem_name = model_info->symbol_table->Get_UTF8_name(nameID);
    644645        int lgth = model_info->symbol_table->Get_UTF8_lgth(nameID);
     
    706707        Advance(1);
    707708       
     709        #if (not defined(OMISSION)) or (OMISSION != NAME_LOOKUP)
    708710        int nameID = Parse_Name();
    709        
     711        #endif
     712        #if (defined(OMISSION)) and (OMISSION == NAME_LOOKUP)
     713        ScanTo(NameFollow);
     714        int nameID = 0;
     715        #endif
    710716        ElementName_action(GetCodeUnitPtr(text_or_markup_start+1), LengthFrom(text_or_markup_start+1));
    711717        /* The following test optimizes the most common case of a
     
    729735                        /* Must be an attribute-value pair or error. */
    730736                        att_name_start = AbsPos();
    731                         int att_nameID = Parse_Name();
    732                         att_name_end = AbsPos();
     737                        #if (not defined(OMISSION)) or (OMISSION != NAME_LOOKUP)
     738                        int att_nameID = Parse_Name();
     739                        #endif
     740                        #if (defined(OMISSION)) and (OMISSION == NAME_LOOKUP)
     741                        ScanTo(NameFollow);
     742                        int att_nameID = 0;
     743                        #endif
     744            att_name_end = AbsPos();
    733745                #if (not defined(OMISSION)) or ((OMISSION != ATTRIBUTE_UNIQUENESS) and (OMISSION != NAME_LOOKUP))
    734746                        int attID = model_info->getOrInsertGlobalAttName(att_nameID);
     
    21622174        int name_pos = AbsPos();
    21632175        ScanTo(NameFollow);
    2164         #if (not defined(OMISSION)) or (OMISSION != NAME_LOOKUP)
    21652176        int lgth = AbsPos()-name_pos;
    21662177
     
    21702181        else
    21712182                return model_info->symbol_table->UTF8_Lookup_or_Insert_XML10_Name((char *)GetCodeUnitPtr(name_pos),lgth);
    2172         #endif
    21732183}
    21742184
Note: See TracChangeset for help on using the changeset viewer.