gpython
gpython copied to clipboard
gpython: Optimize recursive call
Thanks to tengo and @ncw, we can compare the gpython with other interpreted which are implemented in Go.
https://github.com/d5/tengo#benchmark
fib(35) benchmark is slower than I expected, we can optimize this point later. (tail call is faster than CPython, I can't believe it!)
:-) I suspect the times recorded for the tail recursive test are dominated by startup times rather than actually calling the functions.
Perhaps we should have some internal benchmarks which run python code using the go benchmark framework? That would give us a solid baseline to work with.
So we could have a benchmarks
directory with python programs and a little driver to run them through the benchmark code.
@ncw Looks like we have to create a new issue for build benchmark framework for gpython
recommend @sbinet close -- addressed in https://github.com/go-python/gpython/pull/50