Skip to content

Compare speed of various scripting & other languages in a text processing benchmark.

License

Notifications You must be signed in to change notification settings

IanDarwin/perftest

Repository files navigation

perftest - performance of various shell and scripting languages

Patterned after a shorter comparison in Learning Tree Course 396, Unix Tools & Utilities.

Broken on Linux!

This depends on the output format of the original BSD version of the time command. I have added the source here, but it will take a bit of porting to run on foreign systems. Meanwhile, you might be able to make it work on Linux with something like

alias time='time -f "  %E real     %U user   %S system"'

But this has not been tested!

A minimally-invasive pull request that gets it going either way would be appreciated.

Pre-requisites

To use the Java version, you need to install a Java SDK ("JDK"). The current release is Java 23, but the code is simple enough that any release of JDK 11 or later should suffice.

Using your system’s package manager, install as many Awk implementations as you can find - gawk hawk mawk nawk are the most likely ones.

Before you run

There are two sets of tests in the variable PROGS in the runall script. The first one is the full one; the second is a shorter one (omitting the slowest tests) for testing, mainly used when modifying the base package (i.e., for normal use you want the full one). Edit runall to un-comment the one you want.

Running

Just type make. The results will be displayed, and also recorded in the file "results".

If you don’t have make installed, just do sh runall and either redirect or tee the output if you want it saved to a file; report is the customary filename for the output.

About

Compare speed of various scripting & other languages in a text processing benchmark.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published