Skip to content

Commit

Permalink
Make initial capacity of FunctionCallSite#allocateParameters() 16
Browse files Browse the repository at this point in the history
  • Loading branch information
FourteenBrush committed Mar 3, 2024
1 parent 7d79886 commit bad9027
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ public boolean supportsArgs() {
return maxArgs > 0;
}

public FunctionContext allocateParameters() { // TODO: think of a better way to do this, avoid branches
// I'd rather not allocate a double array of Integer.MAX_VALUE size
return new FunctionContext(Math.min(maxArgs, 20));
public FunctionContext allocateParameters() {
return new FunctionContext(16);
}

public double apply(FunctionContext context) {
Expand Down

0 comments on commit bad9027

Please sign in to comment.