% ./bench.sh [~/work/jsonnet]
====== jsonnet ======
real 0m12.994s
user 0m12.944s
sys 0m0.050s
real 0m6.480s
user 0m6.370s
sys 0m0.110s
====== gojsonnet ======
real 0m4.752s
user 0m9.713s
sys 0m0.992s
real 0m1.194s
user 0m2.357s
sys 0m0.168s
====== jrsonnet ======
real 0m0.010s
user 0m0.010s
sys 0m0.000s
real 0m0.348s
user 0m0.258s
sys 0m0.089s
Created
September 21, 2021 14:55
-
-
Save eagletmt/9d4f361f5730289a3b57f5fa822c120f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std.join(' + ', [std.format('{ xs+: [%d] }', i) for i in std.range(0, 10000)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
for cmd in jsonnet gojsonnet jrsonnet | |
do | |
echo "====== $cmd ======" | |
time $cmd -S bench.jsonnet > generated.jsonnet | |
time $cmd --max-stack 30000 generated.jsonnet > /dev/null | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment