3 ms·
For what it's worth, SBCL (which essentially in all ways completely unrelated to chicken other than them both being native compiled dynamic languages) can start
by aidenn0 10y ago
For what it's worth, SBCL (which essentially in all ways completely unrelated to chicken other than them both being native compiled dynamic languages) can startup a minimal runtime and exit in 3.8ms on my system. it goes up to about 5ms for a moderate sized application (which includes some dynamically linked libraries that must be loaded).
on the same system:
/bin/true starts up in 0.5ms
/usr/bin/env perl starts up in 2.4ms
/usr/bin/perl starts up in 1.8ms
If you want to run your own benchmarks, just use time and something like this small program (I ran with 1000 iterations):
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int i;
int iter=atoi(argv[1]);
for(i=0;i<iter;++i) {
pid_t pid=fork();
if(pid) {
waitpid(pid,NULL,0);
}
else {
execl(argv[2],argv[2],NULL);
}
}
return 0;
}