Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mna/bench_go_scripting
Small benchmarks comparing the Tengo and Risor scripting languages
https://github.com/mna/bench_go_scripting
Last synced: 10 days ago
JSON representation
Small benchmarks comparing the Tengo and Risor scripting languages
- Host: GitHub
- URL: https://github.com/mna/bench_go_scripting
- Owner: mna
- Created: 2024-08-08T21:23:28.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-05T22:54:33.000Z (5 months ago)
- Last Synced: 2024-11-23T01:29:06.228Z (2 months ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Benchmarks for Go scripting languages
I wanted to compare [risor](https://github.com/risor-io/risor) with [tengo](https://github.com/d5/tengo), two interesting Go-based scripting languages implemented with a stack-based, bytecode interpreter VM. They both seem fast enough for many scripting uses, the goal is not to discourage use of one or the other - execution speed is but one reason to use a language, and remember that those benchmarks cover tiny specific uses of the language.
Later on I added [goja](https://github.com/dop251/goja), a Javascript interpreter in Go.
To run the benchmarks on your machine, simply clone the repository and run `./run.bash`. You may need to tweak the `count_zeds` benchmark as it relies on the dictionary file found in "/usr/share/dict/words" on my machine.
Results on my old Lenovo T460 laptop (tengo @c461a7f, risor @b83ab51, August 2024):
```
$ ./run.bash
count_zeds tengo: 0m0.253s risor: 0m0.241s
fib tengo: 0m3.037s risor: 0m4.889s
fibt tengo: 0m0.004s risor: 0m0.015s
json tengo: 0m0.008s risor: 0m0.017s
```