Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Permalink
Tree: 7ffba303e1
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

executable file 42 lines (40 sloc) 1.4 KB
#!/usr/bin/env bash
# Copyright 2019 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the “License”);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# <https://apache.org/licenses/LICENSE-2.0>.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
binaries="
v8-7.5.288
v8-7.6.303
v8-7.7.299
v8-7.8.279
v8
chakra
javascriptcore
spidermonkey
";
TIMEFORMAT=%lR;
for bin in $binaries; do
printf "Benchmarking JS literal on ${bin}";
time (for i in {1..100}; do $bin out/js.js; done);
printf "Benchmarking JSON.parse on ${bin}";
time (for i in {1..100}; do $bin out/json.js; done);
if [[ $bin == v8* ]]; then
printf "Benchmarking JS literal with cold loads on ${bin}…\n";
time $bin realm-js.js --nocompilation-cache;
printf "Benchmarking JSON.parse with cold loads on ${bin}…\n";
time $bin realm-json.js --nocompilation-cache;
printf "Benchmarking JS literal with warm loads on ${bin}…\n";
time $bin realm-js.js;
printf "Benchmarking JSON.parse with warm loads on ${bin}…\n";
time $bin realm-json.js;
fi;
done;
You can’t perform that action at this time.