Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch printf-optimization Excluding Merge-Ins
This is equivalent to a diff from d3ac32a6e7 to acdb8f6f10
2017-01-04
| ||
13:09 | Performance enhancements in the printf implementation. (check-in: 82e4001b8c user: drh tags: trunk) | |
04:18 | Factor constant functions out of the inner loop since they are more expensive than the extra OP_Copy needed to move the result into place. (check-in: 80ad317f89 user: drh tags: trunk) | |
01:07 | Attempt to factor out constant functions from the interior of table scans, since functions can often be expensive to compute. (check-in: 62e9270a80 user: drh tags: factor-constant-funcs) | |
00:26 | Changes to the printf implementation for better performance. (Closed-Leaf check-in: acdb8f6f10 user: drh tags: printf-optimization) | |
2017-01-03
| ||
21:57 | Use compiler intrinsic functions for signed integer math when overflow detection is needed. (check-in: d3ac32a6e7 user: drh tags: trunk) | |
21:50 | Back out the use of __sync_fetch_and_sub() as it does not appear to work. (Closed-Leaf check-in: 4c2efd4239 user: drh tags: gnu-safe-math) | |
14:45 | Add the experimental affinity() SQL function when SQLITE_DEBUG is defined. (check-in: bed0eaa5f5 user: drh tags: trunk) | |
Changes to src/printf.c.
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - | etByte prefix; /* Offset into aPrefix[] of the prefix string */ } et_info; /* ** Allowed values for et_info.flags */ #define FLAG_SIGNED 1 /* True if the value to convert is signed */ |
︙ | |||
89 90 91 92 93 94 95 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + - - - - + + + | { 'G', 0, 1, etGENERIC, 14, 0 }, #endif { 'i', 10, 1, etRADIX, 0, 0 }, { 'n', 0, 0, etSIZE, 0, 0 }, { '%', 0, 0, etPERCENT, 0, 0 }, { 'p', 16, 0, etPOINTER, 0, 1 }, |
︙ | |||
187 188 189 190 191 192 193 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - - - - + + - - + - + | etByte flag_altform2; /* True if "!" flag is present */ etByte flag_zeropad; /* True if field width constant starts with zero */ etByte flag_long; /* True if "l" flag is present */ etByte flag_longlong; /* True if the "ll" flag is present */ etByte done; /* Loop termination flag */ etByte xtype = etINVALID; /* Conversion paradigm */ u8 bArgList; /* True for SQLITE_PRINTF_SQLFUNC */ |
︙ | |||
324 325 326 327 328 329 330 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - - + - - - | } /* Fetch the info entry for the field */ infop = &fmtinfo[0]; xtype = etINVALID; for(idx=0; idx<ArraySize(fmtinfo); idx++){ if( c==fmtinfo[idx].fmttype ){ infop = &fmtinfo[idx]; |
︙ | |||
697 698 699 700 701 702 703 | 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 | + + - + + + + + - - - + + + | length = j; /* The precision in %q and %Q means how many input characters to ** consume, not the length of the output... ** if( precision>=0 && precision<length ) length = precision; */ break; } case etTOKEN: { Token *pToken; if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return; |
︙ | |||
730 731 732 733 734 735 736 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | + - - - + + + + + + | }/* End switch over the format type */ /* ** The text of the conversion is pointed to by "bufpt" and is ** "length" characters long. The field width is "width". Do ** the output. */ width -= length; if( width>0 ){ |
︙ |