Fossil

Check-in [72a4b61347]
Login

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

Overview
Comment:Performance optimization in fossil_strcmp().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 72a4b613479ad77bbfc60c8953cc3da598edcf69e4a78c6f7eda5675c98d42fe
User & Date: drh 2019-09-10 11:30:42
Context
2019-09-12
07:31
Add the lock-timeout setting. check-in: 6d3daf74e3 user: drh tags: trunk
2019-09-10
11:30
Performance optimization in fossil_strcmp(). check-in: 72a4b61347 user: drh tags: trunk
2019-09-07
15:03
Adjust test case for TH1 permissions tests. WrUnver (y) is not enabled by default and must be intentionally set. check-in: 582d335737 user: andybradford tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/util.c.

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
int fossil_strcmp(const char *zA, const char *zB){
  if( zA==0 ){
    if( zB==0 ) return 0;
    return -1;
  }else if( zB==0 ){
    return +1;
  }else{
    int a, b;
    do{
      a = *zA++;
      b = *zB++;
    }while( a==b && a!=0 );
    return ((unsigned char)a) - (unsigned char)b;
  }
}
int fossil_strncmp(const char *zA, const char *zB, int nByte){
  if( zA==0 ){
    if( zB==0 ) return 0;
    return -1;
  }else if( zB==0 ){







|
<
<
<
<
<







188
189
190
191
192
193
194
195





196
197
198
199
200
201
202
int fossil_strcmp(const char *zA, const char *zB){
  if( zA==0 ){
    if( zB==0 ) return 0;
    return -1;
  }else if( zB==0 ){
    return +1;
  }else{
    return strcmp(zA,zB);





  }
}
int fossil_strncmp(const char *zA, const char *zB, int nByte){
  if( zA==0 ){
    if( zB==0 ) return 0;
    return -1;
  }else if( zB==0 ){