/ Check-in [b84e7057]
Login

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

Overview
Comment:Add new cases to speedtest1 for measuring performance of binary to/from decimal conversions of floating point values.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b84e7057c05338347b4267f7ccc1d7b9b6d4e9a941ce8b76bf2c27c26772000c
User & Date: drh 2019-05-25 13:14:19
Context
2019-05-25
17:41
Use "long double" literals to initialize an array of "long double" objects. check-in: 2e2ebad3 user: drh tags: trunk
13:14
Add new cases to speedtest1 for measuring performance of binary to/from decimal conversions of floating point values. check-in: b84e7057 user: drh tags: trunk
00:17
Disable the new rounding tests on systems without long double support. check-in: ed250b4e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/speedtest1.c.

  1187   1187       speedtest1_random_ascii_fp(zFP1);
  1188   1188       speedtest1_random_ascii_fp(zFP2);
  1189   1189       sqlite3_bind_text(g.pStmt, 1, zFP1, -1, SQLITE_STATIC);
  1190   1190       sqlite3_bind_text(g.pStmt, 2, zFP2, -1, SQLITE_STATIC);
  1191   1191       speedtest1_run();
  1192   1192     }
  1193   1193     speedtest1_end_test();
         1194  +
         1195  +  n = g.szTest*5000;
         1196  +  speedtest1_begin_test(140, "%d calls to round()", n);
         1197  +  speedtest1_exec("SELECT sum(round(a,2)+round(b,4)) FROM t1;");
         1198  +  speedtest1_end_test();
         1199  +
         1200  +
         1201  +  speedtest1_begin_test(150, "%d printf() calls", n*4);
         1202  +  speedtest1_exec(
         1203  +    "WITH c(fmt) AS (VALUES('%%g'),('%%e'),('%%!g'),('%%.20f'))"
         1204  +    "SELECT sum(printf(fmt,a)) FROM t1, c"
         1205  +  );
         1206  +  speedtest1_end_test();
  1194   1207   }
  1195   1208   
  1196   1209   #ifdef SQLITE_ENABLE_RTREE
  1197   1210   /* Generate two numbers between 1 and mx.  The first number is less than
  1198   1211   ** the second.  Usually the numbers are near each other but can sometimes
  1199   1212   ** be far apart.
  1200   1213   */