Forked from joliss/css-preprocessor-benchmark.sh
Last active
August 29, 2015 14:10
-
-
Save nucliweb/53c7163e7a713502f7b2 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
#!/bin/bash | |
mkdir tmp.$$ | |
for i in {0..9999}; do | |
echo ".x$i{color:green;}" | |
done > tmp.$$/main.scss | |
rm -rf .sass-cache | |
echo Sass: | |
time ~/src/sass/bin/sass tmp.$$/main.scss > /dev/null | |
echo Sass with warm cache: | |
time ~/src/sass/bin/sass tmp.$$/main.scss > /dev/null | |
echo 'SassC (libsass):' | |
time ~/src/sassc/bin/sassc < tmp.$$/main.scss > /dev/null | |
echo Stylus: | |
time ~/src/stylus/bin/stylus < tmp.$$/main.scss > /dev/null | |
echo LESS: | |
time ~/src/less.js/bin/lessc - < tmp.$$/main.scss > /dev/null | |
echo r.js | |
time node ~/src/r.js/dist/r.js -o cssIn=tmp.$$/main.scss out=/dev/null > /dev/null | |
echo Rework: | |
( | |
set -e | |
cd tmp.$$ | |
echo '{}' > package.json | |
npm link rework > /dev/null | |
time node -e "require('rework')(require('fs').readFileSync('main.scss', {encoding: 'utf-8'})) + ''" | |
) | |
rm -r tmp.$$ | |
rm -rf .sass-cache |
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
Sass: | |
real 0m4.945s | |
user 0m4.729s | |
sys 0m0.219s | |
Sass with warm cache: | |
real 0m2.491s | |
user 0m2.399s | |
sys 0m0.092s | |
SassC (libsass): | |
real 0m0.209s | |
user 0m0.193s | |
sys 0m0.016s | |
Stylus: | |
real 0m1.662s | |
user 0m1.519s | |
sys 0m0.160s | |
LESS: | |
real 0m0.488s | |
user 0m0.375s | |
sys 0m0.117s | |
r.js | |
real 0m0.155s | |
user 0m0.115s | |
sys 0m0.041s | |
Rework: | |
real 0m0.218s | |
user 0m0.209s | |
sys 0m0.008s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment