int basetimes = 100000;
measureSpeed("1 + 2",
basetimes * 100,
ExprNodeEvaluatorFactory.get(
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("+",
new exprNodeConstantDesc(1),
new exprNodeConstantDesc(2))),
r,
Integer.valueOf(1 + 2));
measureSpeed("1 + 2 - 3",
basetimes * 100,
ExprNodeEvaluatorFactory.get(
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("-",
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("+",
new exprNodeConstantDesc(1),
new exprNodeConstantDesc(2)),
new exprNodeConstantDesc(3))),
r,
Integer.valueOf(1 + 2 - 3));
measureSpeed("1 + 2 - 3 + 4",
basetimes * 100,
ExprNodeEvaluatorFactory.get(
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("+",
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("-",
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("+",
new exprNodeConstantDesc(1),
new exprNodeConstantDesc(2)),
new exprNodeConstantDesc(3)),
new exprNodeConstantDesc(4))),
r,
Integer.valueOf(1 + 2 - 3 + 4));
measureSpeed("concat(\"1\", \"2\")",
basetimes * 100,
ExprNodeEvaluatorFactory.get(
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("concat",
new exprNodeConstantDesc("1"),
new exprNodeConstantDesc("2"))),
r,
"12");
measureSpeed("concat(concat(\"1\", \"2\"), \"3\")",
basetimes * 100,
ExprNodeEvaluatorFactory.get(
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("concat",
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("concat",
new exprNodeConstantDesc("1"),
new exprNodeConstantDesc("2")),
new exprNodeConstantDesc("3"))),
r,
"123");
measureSpeed("concat(concat(concat(\"1\", \"2\"), \"3\"), \"4\")",
basetimes * 100,
ExprNodeEvaluatorFactory.get(
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("concat",
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("concat",
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("concat",
new exprNodeConstantDesc("1"),
new exprNodeConstantDesc("2")),
new exprNodeConstantDesc("3")),
new exprNodeConstantDesc("4"))),
r,
"1234");
exprNodeDesc constant1 = new exprNodeConstantDesc(1);
exprNodeDesc constant2 = new exprNodeConstantDesc(2);
measureSpeed("concat(col1[1], cola[1])",
basetimes * 10,
ExprNodeEvaluatorFactory.get(
TypeCheckProcFactory.DefaultExprProcessor.getFuncExprNodeDesc("concat",
getListIndexNode(new exprNodeColumnDesc(col1Type, "col1", "", false), constant1),