gpython icon indicating copy to clipboard operation
gpython copied to clipboard

gpython: Optimize recursive call

Open corona10 opened this issue 6 years ago • 3 comments

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!)

corona10 avatar Jan 21 '19 06:01 corona10

:-) 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 avatar Jan 21 '19 17:01 ncw

@ncw Looks like we have to create a new issue for build benchmark framework for gpython

corona10 avatar Jan 22 '19 01:01 corona10

recommend @sbinet close -- addressed in https://github.com/go-python/gpython/pull/50

drew-512 avatar Feb 16 '22 21:02 drew-512