Fossil

Check-in [09d3e7eb]
Login

Check-in [09d3e7eb]

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

Overview
Comment:Further performance enhancements on the delta generator.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 09d3e7ebf0d59ac39b44c4f319748ce96f0e45cd
User & Date: drh 2015-12-27 21:02:32
Context
2015-12-29
05:43
Several documentation wording improvements on the front page. ... (check-in: ebe25922 user: mistachkin tags: trunk)
2015-12-27
21:02
Further performance enhancements on the delta generator. ... (check-in: 09d3e7eb user: drh tags: trunk)
20:05
Performance optimizations for the delta generator. ... (check-in: dbbe3202 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/delta.c.
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
};

/*
** Initialize the rolling hash using the first NHASH characters of z[]
*/
static void hash_init(hash *pHash, const char *z){
  u16 a, b, i;
  a = b = 0;
  for(i=0; i<NHASH; i++){
    a += z[i];
    b += a;
  }
  memcpy(pHash->z, z, NHASH);
  pHash->a = a & 0xffff;
  pHash->b = b & 0xffff;
  pHash->i = 0;







|
|







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
};

/*
** Initialize the rolling hash using the first NHASH characters of z[]
*/
static void hash_init(hash *pHash, const char *z){
  u16 a, b, i;
  a = b = z[0];
  for(i=1; i<NHASH; i++){
    a += z[i];
    b += a;
  }
  memcpy(pHash->z, z, NHASH);
  pHash->a = a & 0xffff;
  pHash->b = b & 0xffff;
  pHash->i = 0;
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
** This routine is intended to be equivalent to:
**    hash h;
**    hash_init(&h, zInput);
**    return hash_32bit(&h);
*/
static u32 hash_once(const char *z){
  u16 a, b, i;
  a = b = 0;
  for(i=0; i<NHASH; i++){
    a += z[i];
    b += a;
  }
  return a | (((u32)b)<<16);
}

/*







|
|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
** This routine is intended to be equivalent to:
**    hash h;
**    hash_init(&h, zInput);
**    return hash_32bit(&h);
*/
static u32 hash_once(const char *z){
  u16 a, b, i;
  a = b = z[0];
  for(i=1; i<NHASH; i++){
    a += z[i];
    b += a;
  }
  return a | (((u32)b)<<16);
}

/*