We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
测试 fib(30),分别用 Go(native),gopher-lua, qlang, otto
fib = fn(n) { if n < 2 { return n } return fib(n-2) + fib(n-1) } fib(30)
结果:
BenchmarkGolang-4 1000 1723098 ns/op 1 B/op 0 allocs/op BenchmarkGopherlua-4 5 230613180 ns/op 539003 B/op 1391 allocs/op BenchmarkQlang-4 1 12594720400 ns/op 2801072688 B/op 52523860 allocs/op BenchmarkOtto-4 1 14532831200 ns/op 4954536800 B/op 75394539 allocs/op
没想到, gopher-lua 速度比 qlang快50多倍,otto 和qlang倒是一个数量级别的。 实在想不通,qlang为什么比 同样是 pure-go 实现的 gopher-lua 慢如此多?
The text was updated successfully, but these errors were encountered:
补上测试代码 script_test.go.txt
Sorry, something went wrong.
当前仍然是专注在使用界面上,而不是性能上。主要是如果有性能敏感的代码,在 qlang 中很容易通过 go 来解决,所以性能没有当做最重要的事项来跟进。详细可参考 #7 这个 issue。
No branches or pull requests
测试 fib(30),分别用 Go(native),gopher-lua, qlang, otto
结果:
没想到, gopher-lua 速度比 qlang快50多倍,otto 和qlang倒是一个数量级别的。
实在想不通,qlang为什么比 同样是 pure-go 实现的 gopher-lua 慢如此多?
The text was updated successfully, but these errors were encountered: