/ Check-in [17e8524f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor performance improvement to sqlite3SerialTypeGet().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 17e8524fc05aa1e6074c19a8ccccc5ab5883103a
User & Date: drh 2013-11-19 13:55:34
Context
2013-11-19
18:17
Fix a harmless MSVC compiler warning. check-in: 6cc023bb user: drh tags: trunk
13:55
Minor performance improvement to sqlite3SerialTypeGet(). check-in: 17e8524f user: drh tags: trunk
12:33
Change Noop-comments in where.c into Module-comments, so that they are omitting without SQLITE_ENABLE_MODULE_COMMENTS. check-in: 3e577f40 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

  2962   2962       case 8:    /* Integer 0 */
  2963   2963       case 9: {  /* Integer 1 */
  2964   2964         pMem->u.i = serial_type-8;
  2965   2965         pMem->flags = MEM_Int;
  2966   2966         return 0;
  2967   2967       }
  2968   2968       default: {
         2969  +      static const u16 aFlag[] = { MEM_Blob|MEM_Ephem, MEM_Str|MEM_Ephem };
  2969   2970         u32 len = (serial_type-12)/2;
  2970   2971         pMem->z = (char *)buf;
  2971   2972         pMem->n = len;
  2972   2973         pMem->xDel = 0;
  2973         -      if( serial_type&0x01 ){
  2974         -        pMem->flags = MEM_Str | MEM_Ephem;
  2975         -      }else{
  2976         -        pMem->flags = MEM_Blob | MEM_Ephem;
  2977         -      }
         2974  +      pMem->flags = aFlag[serial_type&1];
  2978   2975         return len;
  2979   2976       }
  2980   2977     }
  2981   2978     return 0;
  2982   2979   }
  2983   2980   
  2984   2981   /*