This benchmark establishes baseline the cost-of-doing-business for using a given interpreted language. It gauges the initialization/teardown overhead before/after the interpreter can actually do any work. Each program is the nearest equivalent of a single exit(0)
command as possible. This is not a general-purpose benchmark, but it's interesting to see how different interpreters behave. The below tests were all run on the same CPU running the noop programs for 200 iterations.
The original impetus was for a project called impel
which was going to be executed in the $PS1
, $PROMPT_COMMAND
,
precmd
, or equivalent where I wanted to avoid adding latency to the command prompt but was ambivalent about the language it was written in. There are certainly other concerns to be had beyond this overhead, it's just one of many things to take into consideration.