#!/bin/bash # # Usage: # ./opy.sh set -o nounset set -o pipefail set -o errexit readonly THIS_DIR=$[cd $[dirname $0] && pwd] proc osh-byterun { opy/_tmp/repo-with-opy/bin/osh-byterun @Argv } # Show the difference between OSH running under CPython and OSH running under # byterun. proc osh-byterun-speed { pushd $THIS_DIR/.. local prog='for i in $(seq 10); do echo $i; done' time bin/osh -c $prog time osh-byterun -c $prog popd } proc osh-byterun-parse { local prog='echo "hello world"' pushd $THIS_DIR/.. time bin/osh -n -c $prog time osh-byterun -n -c $prog popd } @Argv