A micro benchmark result of scripting languages

Machine: Sony PCG-TR2/B (Pentium M 1GHz)
OS: Windows XP Pro
JVM: j2sdk1.4.2_05
Name Description Code in Pnuts
Func Function call
function f() null
function test(n){
  for(i:0..n) f()
}
test(10000000)
Localfunc Function definition
function test(n){
  for (i:1..n) function () null
}
test(10000000)
Eval Dynamic evaluation
function test(n, s){
  for (i : 1..n) eval(s)
}
test(1000000, "1")
Closure Simple counter implementation using closure
function counter(n) function () n++
function test(n){
  c = counter(0)
  for (i:1..n) c()
}
test(10000000)
Generator Simple generator
function g(n) for (i:1..n) yield i
function test(n){
 for(i: g(n)) i
}
test(10000000)
Loop Simple loop
for(i: 1..100000000){}
Bean Bean property read/write
import java.awt.Button
function test(n){
  b = Button()
  for (i : 1..n) b.name = b.name
}
test(10000000)
Instance Instantiation
function test(n){
  for (i : 1..n) Object()
}
test(10000000)
Method Instance method call
function test(n){
  o = Object()
  for (i : 1..n) o.hashCode()
}
test(10000000)
Println Print empty line
function test(n){
  for (i:1..n) println("")
}
test(1000000)