Skip to content

Commit

Permalink
implement "trick#1", removing padded keys
Browse files Browse the repository at this point in the history
runs in 3.5sec, so a little faster.
  • Loading branch information
cliffclick committed Apr 8, 2021
1 parent e17ee49 commit c1c4d55
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 131 deletions.
10 changes: 6 additions & 4 deletions h2o-core/src/main/java/org/cliffc/sql/Dove0.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public long run() {
sids.delete();
if( PRINT_TIMING ) { t=System.currentTimeMillis(); System.out.println("Dovetail "+(t-t0)+" msec"); t0=t; }

assert cnt==200280; // actually only valid for SF0.1
return cnt;
}

Expand Down Expand Up @@ -135,9 +136,10 @@ final int[] seek_lub(int[] es) {
if( k0!=es[0] ) { // key0 moves
pos = binsearch(es[0],NINF);
assert pos < _nrows;
k0 = vx.at4(pos); // Use original position
k1++; // Advance right-most pad
k2 = vy.at4(pos);
assert es[0]==vx.at4(pos);
k0 = es[0]; // Use original position
k1++; // Advance pad just left of right-most reset key
k2 = vy.at4(pos); // Reset to min for k0
}
break;

Expand Down Expand Up @@ -227,7 +229,7 @@ private long join_triangles( Vec v0, Vec v1 ) {
int[] es0 = new int[]{e0,e0,e0}, es = es0;

// Until at_end, find first minimal iter, and seek_lub.
int debug_cnt=0;
int debug_cnt=0, DEBUG_CNT=-1;
long cnt=0;
while( !at_end(iters) ) {
// Find minimal iter
Expand Down
Loading

0 comments on commit c1c4d55

Please sign in to comment.