Skip to content

Instantly share code, notes, and snippets.

@evenstensberg
Created February 25, 2018 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evenstensberg/8cae799a956b8c034949ae7ef2c43d68 to your computer and use it in GitHub Desktop.
Save evenstensberg/8cae799a956b8c034949ae7ef2c43d68 to your computer and use it in GitHub Desktop.
ESM perf on test suite
#!/usr/bin/env bash
T="$(date +%s)"
cd esm
npm run test
T="$(($(date +%s)-T))"
npm install --save v8-compile-cache
ex -sc '2i|require("v8-compile-cache")' -cx script/test.js
T2="$(date +%s)"
npm run test
T2="$(($(date +%s)-T2))"
npm uninstall v8-compile-cache
ex -sc '2d' -cx script/test.js
rm -rf node_modules
npm install
echo "Without V8: (secs) ${T}"
echo "With V8: (secs) ${T2}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment