Changeset: 8feccffe5169 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8feccffe5169
Added Files:
        monetdb5/mal/Tests/performanceTests/tst400h.mal
Modified Files:
        gdk/gdk_bbp.mx
        monetdb5/mal/Tests/performanceTests/tst400a.mal
Branch: default
Log Message:

Performance analysis of BBPcache
The overall conclusion is that for code simplicity we may remove
the BBP cache. The difference is between 0.8 and 3 usec for creating
a BAT. Given all other costs this does not make a big difference in
almost all circumstances.


diffs (46 lines):

diff --git a/gdk/gdk_bbp.mx b/gdk/gdk_bbp.mx
--- a/gdk/gdk_bbp.mx
+++ b/gdk/gdk_bbp.mx
@@ -3318,6 +3318,11 @@ BBPquickdesc(bat bid, int delaccess)
  * so with caching *some* programs can be nearly twice as fast
  * (optimized compile), though I expect the gains to be smaller in
  * general.
+
+ * June 2012 
+ * Using the cache makes a difference between [ 823085 ] and [ 3076993 ] usec
+ * when you create 1M bats. The loop itself was [ 62576 ] usec 
(performanceTests/tst400h.mal)
+ * Indeed, this code is a candidate for removal to gain simplicity.
  */
 #define BATCACHE_NOTYPE(t)     (ATOMstorage(t) > TYPE_str || 
BATatoms[t].atomFix != NULL)
 #define BATCACHE_SIZE          1023    /* max size: 32767 */
diff --git a/monetdb5/mal/Tests/performanceTests/tst400a.mal 
b/monetdb5/mal/Tests/performanceTests/tst400a.mal
--- a/monetdb5/mal/Tests/performanceTests/tst400a.mal
+++ b/monetdb5/mal/Tests/performanceTests/tst400a.mal
@@ -1,6 +1,10 @@
 # simple iterator loop test
 
+t0:= alarm.usec();
 barrier (b,v):= language.newRange(0:lng);
        redo (b,v):= language.nextElement(1:lng,1000000:lng);
 exit   (b,v);
+t1:= alarm.usec();
+t1:= t1-t0;
+io.print(t1);
 io.print("end of loop");
diff --git a/monetdb5/mal/Tests/performanceTests/tst400h.mal 
b/monetdb5/mal/Tests/performanceTests/tst400h.mal
new file mode 100644
--- /dev/null
+++ b/monetdb5/mal/Tests/performanceTests/tst400h.mal
@@ -0,0 +1,12 @@
+# simple iterator loop test
+# cost of creating/GC simple BATs.
+
+io.print("small bat creation");
+t1:= alarm.usec();
+barrier (v,i):= language.newRange(0:lng);
+       b:= bat.new(:int,:int);
+       redo (v,i):= language.nextElement(1:lng,1000000:lng);
+exit   (v,i);
+t2:= alarm.usec();
+t1:= t2-t1;
+io.print(t1);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to