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.

Location:
libcfa/src/collections
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/collections/string.cfa

    r65bd3c2 rae0c1c3  
    216216        }
    217217
    218         void ?|?( ostype & out, string s ) {
     218        void ?|?( ostype & out, string s ) with ( basic_ostream_table ) {
    219219                (ostype &)(out | (*s.inner)); ends( out );
    220220        }
     
    229229        } // ?|?
    230230
    231         void ?|?( ostype & os, _Ostream_Manip(string) f ) {
     231        void ?|?( ostype & os, _Ostream_Manip(string) f ) with ( basic_ostream_table ) {
    232232                (ostype &)(os | f); ends( os );
    233233        }
  • libcfa/src/collections/string_res.cfa

    r65bd3c2 rae0c1c3  
    201201forall( ostype & | basic_ostream( ostype ) )
    202202void ?|?( ostype & out, const string_res & s ) {
    203         (ostype &)(out | s); ends( out );
     203        (ostype &)(out | s);
     204        basic_ostream_table.ends( out );
    204205}
    205206
     
    249250
    250251forall( istype & | basic_istream( istype ) )
    251 istype & ?|?( istype & is, _Istream_Rquote f ) with( f.rstr ) {
     252istype & ?|?( istype & is, _Istream_Rquote f ) with( basic_istream_table, f.rstr ) {
    252253        if ( eof( is ) ) throwResume ExceptionInst( end_of_file );
    253254        int args;
Note: See TracChangeset for help on using the changeset viewer.