Skip to content

Commit

Permalink
perf: use a closure instead of binding
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jan 9, 2019
1 parent 380dbc7 commit 47f0677
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/src/compute/predicate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ export class Col<T= any> extends Value<T> {
}
if (this.colidx < 0) { throw new Error(`Failed to bind Col "${this.name}"`); }
}
this.vector = batch.getChildAt(this.colidx)!;
return this.vector.get.bind(this.vector);

const vec = this.vector = batch.getChildAt(this.colidx)!;
return (idx: number) => vec.get(idx);
}
}

Expand Down

0 comments on commit 47f0677

Please sign in to comment.