/ Check-in [61aa2031]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Performance enhancement to the blob-literal tokenizer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 61aa2031f1c5ae05e31077588a55194a9546262a
User & Date: drh 2011-06-03 21:34:45
Context
2011-06-03
23:28
Performance improvements on memory copies inside of btree by moving 2 bytes at a time instead of just 1 byte at a time. check-in: 897f56a1 user: drh tags: trunk
21:34
Performance enhancement to the blob-literal tokenizer. check-in: 61aa2031 user: drh tags: trunk
20:11
Create and use a function especially for adding the ParseSchema opcode. This gives a small reduction in code and a small performance increase. check-in: 957b2ab6 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tokenize.c.

349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
      return i;
    }
#ifndef SQLITE_OMIT_BLOB_LITERAL
    case 'x': case 'X': {
      testcase( z[0]=='x' ); testcase( z[0]=='X' );
      if( z[1]=='\'' ){
        *tokenType = TK_BLOB;
        for(i=2; (c=z[i])!=0 && c!='\''; i++){
          if( !sqlite3Isxdigit(c) ){
            *tokenType = TK_ILLEGAL;
          }
        }
        if( i%2 || !c ) *tokenType = TK_ILLEGAL;
        if( c ) i++;
        return i;
      }
      /* Otherwise fall through to the next case */
    }
#endif
    default: {
      if( !IdChar(*z) ){







|
|
|
|
|
|
<







349
350
351
352
353
354
355
356
357
358
359
360
361

362
363
364
365
366
367
368
      return i;
    }
#ifndef SQLITE_OMIT_BLOB_LITERAL
    case 'x': case 'X': {
      testcase( z[0]=='x' ); testcase( z[0]=='X' );
      if( z[1]=='\'' ){
        *tokenType = TK_BLOB;
        for(i=2; sqlite3Isxdigit(z[i]); i++){}
        if( z[i]!='\'' || i%2 ){
          *tokenType = TK_ILLEGAL;
          while( z[i] && z[i]!='\'' ){ i++; }
        }
        if( z[i] ) i++;

        return i;
      }
      /* Otherwise fall through to the next case */
    }
#endif
    default: {
      if( !IdChar(*z) ){