{"id":24542882,"url":"https://github.com/maxgyver83/interpreter-startup-times","last_synced_at":"2025-03-16T06:44:58.667Z","repository":{"id":175080898,"uuid":"653318065","full_name":"MaxGyver83/interpreter-startup-times","owner":"MaxGyver83","description":"Benchmark of startup times for various script language interpreters","archived":false,"fork":false,"pushed_at":"2023-12-29T21:25:32.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T19:19:06.492Z","etag":null,"topics":["bash-script","benchmark","gnuplot","interpreters","posix","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxGyver83.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-06-13T20:33:41.000Z","updated_at":"2024-07-20T21:51:33.000Z","dependencies_parsed_at":"2023-06-29T10:00:56.202Z","dependency_job_id":null,"html_url":"https://github.com/MaxGyver83/interpreter-startup-times","commit_stats":null,"previous_names":["maxgyver83/interpreter-startup-times"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGyver83%2Finterpreter-startup-times","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGyver83%2Finterpreter-startup-times/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGyver83%2Finterpreter-startup-times/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGyver83%2Finterpreter-startup-times/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxGyver83","download_url":"https://codeload.github.com/MaxGyver83/interpreter-startup-times/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835931,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-script","benchmark","gnuplot","interpreters","posix","shell-script"],"created_at":"2025-01-22T19:19:08.120Z","updated_at":"2025-03-16T06:44:58.630Z","avatar_url":"https://github.com/MaxGyver83.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Interpreter startup times benchmark\n\nThis repository contains a (bash) [script](./measure-startup-times) to measure\nthe startup times of various scripting language interpreters and a (POSIX shell)\n[script](./create-plot) to plot the results with gnuplot.\n\nStartup times are determined by starting every interpreter with an empty\nexpression 30 times and then calculating the average.\n\n[results.txt](./results.txt) contains the results for selected scripting\nlanguages as measured on my laptop (ASUS B9440UA, from 2017) with Arch Linux\ninstalled.\n\n## Startup times for interpreters faster than 100 ms\n\n![below 100ms](https://maximilian-schillinger.de/img/below_100ms.png)\n\n## Startup times for interpreters faster than 10 ms\n\n![fastest interpreters](https://maximilian-schillinger.de/img/fast.png)\n\n## Startup times for interpreters slower than 10 ms\n\n![slowest interpreters](https://maximilian-schillinger.de/img/slow.png)\n\n## Startup times for all interpreters with a logarithmic scale\n\n![all interpreters logarithmic scale](https://maximilian-schillinger.de/img/all.png)\n\n## Versions\n\n```\n groovy: Groovy Version: 4.0.12 JVM: 1.8.0_372 Vendor: Oracle Corporation OS: Linux\n  xonsh: xonsh/0.14.0\n fennel: Fennel 1.4.0 on PUC Lua 5.4\n   node: v20.2.0\n   ruby: ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]\n     nu: 0.81.0\n python: Python 3.11.3\n    php: PHP 8.2.7 (cli) (built: Jun 10 2023 08:47:39) (NTS)\n     rc: 2023-12-27\n   fish: fish, version 3.6.1\n  clisp: GNU CLISP 2.49.93+ (2018-02-18) (built on root2 [65.108.105.205])\n     bb: babashka v1.3.186\n   sbcl: SBCL 2.3.11\n  janet: 1.32.1-a93517f\n    zsh: zsh 5.9 (x86_64-pc-linux-gnu)\n   bash: GNU bash, Version 5.1.16(1)-release (x86_64-pc-linux-gnu)\n   yash: Yet another shell, version 2.52\n   perl: This is perl 5, version 36, subversion 1 (v5.36.1) built for x86_64-linux-thread-multi\n    lua: Lua 5.4.6  Copyright (C) 1994-2023 Lua.org, PUC-Rio\n   mrsh: 2022-09-14\n   oksh: oksh 7.2-1\n luajit: LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2022 Mike Pall. https://luajit.org/\n   dash: dash 0.5.12-1\n   mksh: @(#)MIRBSD KSH R59 2023/06/03\n    ash: BusyBox v1.34.1 () multi-call binary.\n```\n\n## Remarks\n\n- How fast an interpreter starts is only one of multiple factors if you want to\n  compare the \"speed\" of scripting languages.\n- This comparison is only about script execution, not about interactive mode.\n- The loop (of 30 iterations) itself is contained in the average startup times.\n  That's why I have added a \"no-operations\" (`noop`) entry which does 30 times\n  nothing. This takes on average 0.03 ms per iteration. Subtract this from all\n  results for correct numbers.\n- `ash` is actually `busybox ash`.\n- [rc](https://git.sr.ht/~sircmpwn/rc) and\n  [mrsh](https://git.sr.ht/~emersion/mrsh) are not yet finished/released. I have\n  added them anyway.\n- I don't use all of these languages. If any result is unexpected (maybe\n  because of a bad configuration on my laptop), just send me an e-mail or create\n  an issue.\n- My locale is `de_DE.UTF-8`. When I set `LC_ALL` to `C` and run\n  `./measure-startup-times` again, `zsh`, `bash` and `yash` run much faster.\n  `oksh` runs much slower. For all others I get similar results as before.\n- The included [gnuplot script](./plot.gnu) uses the [Turbo\n  colormap](https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html)\n  from the\n  [Gnuplotting/gnuplot-palettes](https://github.com/Gnuplotting/gnuplot-palettes)\n  repo.\n  [turbo.pal](https://github.com/Gnuplotting/gnuplot-palettes/blob/master/turbo.pal)\n  is not included in this repo because I'm not a license expert. Just\n  clone/download it yourself.\n\n## Usage\n\nIf you want to reproduce these results, you should have all interpreters listed\nabove plus `gnuplot` installed (and `wget` or a browser for downloading\n`turbo.pal`).\n\n```sh\n./measure-startup-times all | tee results.txt\nwget https://raw.githubusercontent.com/Gnuplotting/gnuplot-palettes/master/turbo.pal\n# create the first three plots shown above\n./create-plot all-plots\n# create the fourth plot shown above\n./create-plot -l -w all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgyver83%2Finterpreter-startup-times","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxgyver83%2Finterpreter-startup-times","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgyver83%2Finterpreter-startup-times/lists"}