📄 tst950.mal
字号:
# the multiplex code blocks.t0:= alarm.usec();size:= 1024:lng;size:= 16* size;R:= bat.new(:int,:oid);S:= bat.new(:oid,:int);barrier (go,i):= mal.newRange(0:lng); l:= calc.int(i); bat.insert(R,l,nil); bat.insert(S,nil,l); redo (go,i):= mal.nextElement(1:lng,size);exit (go,i); t1:= alarm.usec(); d0:= t1-t0; io.printf("#loop %d\n",d0); t0:= t1;# z:= algebra.cartesianproduct(R,S);# size:= aggr.count(z);# t1:= alarm.usec();# d0:= t1-t0;# io.printf("#cartesianproduct size %d\n",size);# io.printf("#perform cartesianproduct %d\n",d0);# t0:= t1; chksize:= size/10;barrier (b1,rf):= chop.newIterator(R,chksize);barrier (b2,sf):= chop.newIterator(S,chksize); pi:= algebra.cartesianproduct(rf,sf);redo (b2,sf):= chop.hasMoreElements(S,chksize);redo (b1,rf):= chop.hasMoreElements(R,chksize);exit b2;exit b1; t1:= alarm.usec(); d0:= t1-t0; io.printf("#chopped cross product %d\n",d0); t0:= t1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -