Ignore:
Timestamp:
Apr 25, 2025, 7:08:53 PM (8 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
7d02d35, ecfa58be
Parents:
65bd3c2
Message:

Rewrote the iostream traits to have a single assertion each, a table containing function pointers. This is just an experiment right now. It seems that it does cause significant speed up of assertion resolution, but for some reason also seems to add a flat overhead that mostly eats up that saving.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/strstream.cfa

    r65bd3c2 rae0c1c3  
    2828// *********************************** strstream ***********************************
    2929
     30static basic_ostream_data(ostrstream) ostrstream_basic_data = {
     31        sepPrt$,
     32        sepReset$,
     33        sepReset$,
     34        sepGetCur$,
     35        sepSetCur$,
     36        getNL$,
     37        setNL$,
     38        getANL$,
     39        setANL$,
     40        getPrt$,
     41        setPrt$,
     42        nlOn,
     43        nlOff,
     44        sep,
     45        nosep,
     46        sepOn,
     47        sepOff,
     48        sepGet,
     49        sepSet,
     50        sepGetTuple,
     51        sepSetTuple,
     52        ends,
     53        fmt,
     54};
     55
     56basic_ostream_data(ostrstream) const & basic_ostream_table = ostrstream_basic_data;
    3057
    3158#define IO_MSG "I/O error: "
     
    130157
    131158// *********************************** istrstream ***********************************
     159
     160static basic_istream_data(istrstream) istrstream_basic_data = {
     161        getANL$,
     162        setANL$,
     163        nlOn,
     164        nlOff,
     165        fmt,
     166        ungetc,
     167        eof,
     168        clearerr,
     169};
     170
     171basic_istream_data(istrstream) const & basic_istream_data = istrstream_basic_data;
    132172
    133173// private
Note: See TracChangeset for help on using the changeset viewer.