* @param args
*/
public static void main(final String[] args) {
Binding binding = new Binding();
binding.setVariable("foo", new Integer(2));
GroovyShell shell = new GroovyShell(binding);
long start = System.currentTimeMillis();
Script script = shell.parse("x = 123; return foo * 10");
MetaClass metaClass = script.getMetaClass();
Binding binding2 = script.getBinding();
for (int i = 0; i < 1000; i++) {
script.run();
}
long end = System.currentTimeMillis() - start;
System.out.println("Parsowenie " + end);
start = System.currentTimeMillis();
for (int i = 0; i < 1000; i++) {
Object value = shell.evaluate("x = 123; return foo * 10");
}
end = System.currentTimeMillis() - start;
System.out.println("Evolution " + end);
// assert value.equals(new Integer(20));