Add Node to perf numbers.

This commit is contained in:
Natalie Weizenbaum 2016-10-07 15:22:11 -07:00
parent d90b8e52ae
commit 169370bf18

22
perf.md
View File

@ -4,8 +4,8 @@ the benefit Dart Sass could provide relative to other implementations.
This was tested against:
* libsass eee6d59 and sassc 2fcd639 compiled with g++ 4.8.4.
* Dart Sass dfecdcd on Dart 1.19.1.
* Ruby Sass e79f5cf on Ruby 2.2.4p230
* Dart Sass dfecdcd on Dart 1.19.1 and Node 4.6.0.
* Ruby Sass e79f5cf on Ruby 2.2.4p230.
on Ubuntu x64 with Intel Xeon E5-1650 v3 @ 3.50GHz.
@ -20,6 +20,7 @@ Running on a file containing 4 instances of `.foo {a: b}`:
* sassc: 0.003s
* Dart Sass from source: 0.255s
* Dart Sass from a snapshot: 0.193s
* Dart Sass on Node.js via dart2js: 0.227s
* Ruby Sass with a hot cache: 0.130s
## Large Plain CSS
@ -29,11 +30,13 @@ Running on a file containing 2^17 instances of `.foo {a: b}`:
* sassc: 1.972s
* Dart Sass from source: 2.597s
* Dart Sass from a snapshot: 2.547s
* Dart Sass on Node.js via dart2js: 4.971s
* Ruby Sass with a hot cache: 14.484s
Based on these numbers, Dart Sass is approximately:
* 1.3x slower than libsass
* 2x faster on the Dart VM than on Node
* 5.7x faster than Ruby Sass
## Preceding Sparse `@extend`
@ -43,11 +46,13 @@ and then `.y {a: b}`:
* sassc: 2.202s
* Dart Sass from a snapshot: 2.598s
* Dart Sass on Node.js via dart2js: 5.309s
* Ruby Sass with a hot cache: 22.423s
Based on these numbers, Dart Sass is approximately:
* 1.2x slower than libsass
* 2x faster on the Dart VM than on Node
* 8.6x faster than Ruby Sass
## Following Sparse `@extend`
@ -57,11 +62,13 @@ and then `.x {@extend .y}`:
* sassc: 2.207s
* Dart Sass from a snapshot: 2.569s
* Dart Sass on Node.js via dart2js: 5.053s
* Ruby Sass with a hot cache: 22.221s
Based on these numbers, Dart Sass is approximately:
* 1.2x slower than libsass
* 2x faster on the Dart VM than on Node
* 8.7x faster than Ruby Sass
## Preceding Dense `@extend`
@ -71,11 +78,13 @@ Running on a file containing `.bar {@extend .foo}` followed by 2^17 instances of
* sassc: 6.703s
* Dart Sass from a snapshot: 3.922s
* Dart Sass on Node.js via dart2js: 9.300s
* Ruby Sass with a hot cache: 40.193s
Based on these numbers, Dart Sass is approximately:
* 1.7x faster than libsass
* 2.4x faster on the Dart VM than on Node
* 10.3x faster than Ruby Sass
## Following Dense `@extend`
@ -85,11 +94,13 @@ Running on a file containing 2^17 instances of `.foo {a: b}` followed by
* sassc: 6.636s
* Dart Sass from a snapshot: 3.644s
* Dart Sass on Node.js via dart2js: 9.138s
* Ruby Sass with a hot cache: 39.603s
Based on these numbers, Dart Sass is approximately:
* 1.8x faster than libsass
* 2.5x faster on the Dart VM than on Node
* 10.9x faster than Ruby Sass
# Conclusions
@ -111,4 +122,11 @@ the implementation and may explain some of the speed gains. However, even if
other implementations could be faster, it's still the case that Dart Sass is
*fast enough*.
It's also interesting to note where Dart Sass falls when run on Node.js. It's
enough slower than the Dart VM that we probably don't want to position Node.js
as the primary way of running Sass, but it's still substantially faster than
Ruby. It probably makes sense to distribute Dart Sass through JS channels as an
low-overhead introduction, and then make it easy for users to upgrade to the
Dart version later on for more speed.
[1599]: https://github.com/sass/sass/issues/1599