]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Reorder the terms of a conditional for a small performance gain.
authordrh <drh@noemail.net>
Thu, 25 Jun 2015 16:01:44 +0000 (16:01 +0000)
committerdrh <drh@noemail.net>
Thu, 25 Jun 2015 16:01:44 +0000 (16:01 +0000)
FossilOrigin-Name: d67b0ed1054cbb7ea2cdd74720d4d6e0227cec14

manifest
manifest.uuid
src/btree.c

index 1771c7814922248f382e3cefa63b1677ca866369..fbf418370ded35744238140ced63b285862d03dd 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sa\sNEVER()\sthat\sis\sin\sfact\sreachable.
-D 2015-06-25T15:21:52.642
+C Reorder\sthe\sterms\sof\sa\sconditional\sfor\sa\ssmall\sperformance\sgain.
+D 2015-06-25T16:01:44.112
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 1063c58075b7400d93326b0eb332b48a54f53025
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -192,7 +192,7 @@ F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240
 F src/backup.c ff743689c4d6c5cb55ad42ed9d174b2b3e71f1e3
 F src/bitvec.c 5eb7958c3bf65210211cbcfc44eff86d0ded7c9d
 F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79
-F src/btree.c cb50b3f00fec44481c4b0a7f9ab1e4bed2ffce18
+F src/btree.c 85679f63ebc2c67593479cf22f88539f71f2af70
 F src/btree.h 969adc948e89e449220ff0ff724c94bb2a52e9f1
 F src/btreeInt.h fdd1aff02fb2a63812bd95716e7f579fc3759107
 F src/build.c b3f15255d5b16e42dafeaa638fd4f8a47c94ed70
@@ -1286,7 +1286,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P d007bc339b9ea6d59a3dd2b0c5e77e9c801b16f6
-R b3d0d7d3ac81c0743783e0e414777712
+P f824e66b0dc120bed227c7446e2663fcad7cc4f6
+R 8aa067d659e72dd17b19d63682b0eebd
 U drh
-Z ec9d3f29e33fb82221154b9d11e7c8ba
+Z c674ba4fda0e43aa32d59f882342a9d7
index 3239fd0d3d41c9232c48f34582e052cd8a140945..67e0ce0f605e62229ba65b8e265067aa09d10b5a 100644 (file)
@@ -1 +1 @@
-f824e66b0dc120bed227c7446e2663fcad7cc4f6
\ No newline at end of file
+d67b0ed1054cbb7ea2cdd74720d4d6e0227cec14
\ No newline at end of file
index 0cd871923f82120eb191ddca33d191022f64cb42..646367c2e0af32ba8d609daa804304a981b80961 100644 (file)
@@ -1457,7 +1457,7 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
   testcase( gap+2==top );
   testcase( gap+1==top );
   testcase( gap==top );
-  if( gap+2<=top && (data[hdr+1] || data[hdr+2]) ){
+  if( (data[hdr+2] || data[hdr+1]) && gap+2<=top ){
     int bDefrag = 0;
     u8 *pSpace = pageFindSlot(pPage, nByte, &rc, &bDefrag);
     if( rc ) return rc;