Ignore:
Timestamp:
Aug 4, 2011, 5:33:44 AM (8 years ago)
Author:
cameron
Message:

Optimize checking of UTF-8 E0/ED F0/F4 constraints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_pablo.py

    r1267 r1272  
    265265                        u8.xBE = (temp73 & temp15);
    266266#
    267 #  Probably faster, but Advance32 not presently allowed within if.  RDC Jul 31/11
    268 #                       E0_F0_scope = bitutil.Advance(xE0 | xF0)
    269 #                       ED_F4_scope = bitutil.Advance(xED | xF4)
    270 #                       u8.xEF_scope = bitutil.Advance(xEF);
     267
    271268#                       scope3_32 = bitutil.Advance32(u8.prefix3)
    272269#                       scope4_32 = bitutil.Advance32(u8.prefix4)
     
    276273#                       u8.scope43 = interpose32(u8.prefix4, scope4_32, 2)
    277274#                       u8.scope44 = interpose32(u8.prefix4, scope4_32, 3)
    278 #                       u8.xE0_scope = u8.scope32 & E0_F0_scope
    279 #                       u8.xED_scope = u8.scope32 & ED_F4_scope
    280 #                       u8.xF0_scope = u8.scope42 & E0_F0_scope
    281 #                       u8.xF4_scope = u8.scope42 & ED_F4_scope
    282 #
    283                         u8.xE0_scope = bitutil.Advance(xE0);
    284                         u8.xED_scope = bitutil.Advance(xED);
    285                         u8.xF0_scope = bitutil.Advance(xF0);
    286                         u8.xF4_scope = bitutil.Advance(xF4);
    287                         u8.xEF_scope = bitutil.Advance(xEF);
     275#
    288276                        u8.scope32 = bitutil.Advance(u8.prefix3)
    289277                        u8.scope33 = bitutil.Advance(u8.scope32)
     
    291279                        u8.scope43 = bitutil.Advance(u8.scope42)
    292280                        u8.scope44 = bitutil.Advance(u8.scope43)
     281#
     282#                       u8.xE0_scope = bitutil.Advance(xE0);
     283#                       u8.xED_scope = bitutil.Advance(xED);
     284#                       u8.xF0_scope = bitutil.Advance(xF0);
     285#                       u8.xF4_scope = bitutil.Advance(xF4);
     286                        E0_F0_scope = bitutil.Advance(xE0 | xF0)
     287                        ED_F4_scope = bitutil.Advance(xED | xF4)
     288                        u8.xE0_scope = u8.scope32 & E0_F0_scope
     289                        u8.xED_scope = u8.scope32 & ED_F4_scope
     290                        u8.xF0_scope = u8.scope42 & E0_F0_scope
     291                        u8.xF4_scope = u8.scope42 & ED_F4_scope
     292                        u8.xEF_scope = bitutil.Advance(xEF);
    293293
    294294                        u8lastscope = u8.scope22 | u8.scope33 | u8.scope44
Note: See TracChangeset for help on using the changeset viewer.