SpEL API polishing
This commit is contained in:
@@ -97,27 +97,22 @@ namespace Spring.Expressions
|
||||
str.Text = "theArg";
|
||||
fn.addChild(str);
|
||||
|
||||
IExpression exp = fn;
|
||||
|
||||
string result = str.Text;
|
||||
// string result = string.Format("{0},{1},{2}", this.GetHashCode(), str.Text, str2.Text);
|
||||
|
||||
int ITERATIONS = 1000000;
|
||||
int ITERATIONS = 10000000;
|
||||
|
||||
StopWatch watch = new StopWatch();
|
||||
// using (watch.Start("Duration Direct: {0}"))
|
||||
// {
|
||||
// for (int i = 0; i < ITERATIONS; i++)
|
||||
// {
|
||||
// noop(str.getText());
|
||||
// }
|
||||
// }
|
||||
using (watch.Start("Duration Direct: {0}"))
|
||||
{
|
||||
for (int i = 0; i < ITERATIONS; i++)
|
||||
{
|
||||
((WaitCallback)vars["noop"])(str.getText());
|
||||
}
|
||||
}
|
||||
|
||||
using (watch.Start("Duration SpEL: {0}"))
|
||||
{
|
||||
for (int i = 0; i < ITERATIONS; i++)
|
||||
{
|
||||
exp.GetValue(null, vars);
|
||||
fn.GetValue(null, vars);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user