mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-26 20:24:42 +01:00
Update benchmarks (#759)
This commit is contained in:
parent
fb75fc39ce
commit
a7172a2b1d
145
perf.md
145
perf.md
@ -3,8 +3,8 @@ the benefit Dart Sass could provide relative to other implementations.
|
||||
|
||||
This was tested against:
|
||||
|
||||
* libsass 8d220b74 and sassc 3f84e23 compiled with g++ (Debian 7.3.0-18) 7.3.0.
|
||||
* Dart Sass 2868ab3 on Dart 2.3.0 and Node v11.14.0.
|
||||
* libsass 0f3d6ad1 and sassc 4674821 compiled with g++ (Debian 7.3.0-18) 7.3.0.
|
||||
* Dart Sass 088fc28 on Dart 2.4.0 and Node v12.0.0.
|
||||
* Ruby Sass 8d1edc76 on ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux].
|
||||
|
||||
on Debian x64 with Intel Xeon E5-1650 v3 @ 3.50GHz. The Dart Sass
|
||||
@ -21,147 +21,148 @@ I ran five instances of each configuration and recorded the fastest time.
|
||||
Running on a file containing 4 instances of `.foo {a: b}`:
|
||||
|
||||
* sassc: 0.004s
|
||||
* Dart Sass from a script snapshot: 0.188s
|
||||
* Dart Sass native executable: 0.014s
|
||||
* Dart Sass on Node.js: 0.169s
|
||||
* Ruby Sass with a hot cache: 0.151s
|
||||
* Dart Sass from a script snapshot: 0.219s
|
||||
* Dart Sass native executable: 0.020s
|
||||
* Dart Sass on Node.js: 0.200s
|
||||
* Ruby Sass with a hot cache: 0.155s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 3.5x slower than libsass
|
||||
* 12.1x faster than Dart Sass on Node
|
||||
* 10.8x faster than Ruby Sass
|
||||
* 5.0x slower than libsass
|
||||
* 10.0x faster than Dart Sass on Node
|
||||
* 7.8x faster than Ruby Sass
|
||||
|
||||
## Large Plain CSS
|
||||
|
||||
Running on a file containing 2^17 instances of `.foo {a: b}`:
|
||||
|
||||
* sassc: 1.909s
|
||||
* Dart Sass from a script snapshot: 1.586s
|
||||
* Dart Sass native executable: 1.438s
|
||||
* Dart Sass on Node.js: 3.028s
|
||||
* Ruby Sass with a hot cache: 10.772s
|
||||
* sassc: 1.714s
|
||||
* Dart Sass from a script snapshot: 1.606s
|
||||
* Dart Sass native executable: 1.547s
|
||||
* Dart Sass on Node.js: 2.672s
|
||||
* Ruby Sass with a hot cache: 11.145s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 1.3x faster than libsass
|
||||
* 2.1x faster than Dart Sass on Node
|
||||
* 7.5x faster than Ruby Sass
|
||||
* 1.1x faster than libsass
|
||||
* 1.7x faster than Dart Sass on Node
|
||||
* 7.2x faster than Ruby Sass
|
||||
|
||||
## Preceding Sparse `@extend`
|
||||
|
||||
Running on a file containing `.x {@extend .y}`, 2^17 instances of `.foo {a: b}`, and then `.y {a: b}`:
|
||||
|
||||
* sassc: 2.007s
|
||||
* Dart Sass from a script snapshot: 1.617s
|
||||
* Dart Sass native executable: 1.457s
|
||||
* Dart Sass on Node.js: 3.072s
|
||||
* Ruby Sass with a hot cache: 16.456s
|
||||
* sassc: 1.750s
|
||||
* Dart Sass from a script snapshot: 1.602s
|
||||
* Dart Sass native executable: 1.585s
|
||||
* Dart Sass on Node.js: 2.782s
|
||||
* Ruby Sass with a hot cache: 17.012s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 1.4x faster than libsass
|
||||
* 2.1x faster than Dart Sass on Node
|
||||
* 11.3x faster than Ruby Sass
|
||||
* 1.1x faster than libsass
|
||||
* 1.8x faster than Dart Sass on Node
|
||||
* 10.7x faster than Ruby Sass
|
||||
|
||||
## Following Sparse `@extend`
|
||||
|
||||
Running on a file containing `.y {a: b}`, 2^17 instances of `.foo {a: b}`, and then `.x {@extend .y}`:
|
||||
|
||||
* sassc: 1.934s
|
||||
* Dart Sass from a script snapshot: 1.594s
|
||||
* Dart Sass native executable: 1.433s
|
||||
* Dart Sass on Node.js: 3.099s
|
||||
* Ruby Sass with a hot cache: 16.497s
|
||||
* sassc: 1.724s
|
||||
* Dart Sass from a script snapshot: 1.610s
|
||||
* Dart Sass native executable: 1.568s
|
||||
* Dart Sass on Node.js: 2.712s
|
||||
* Ruby Sass with a hot cache: 16.670s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 1.3x faster than libsass
|
||||
* 2.2x faster than Dart Sass on Node
|
||||
* 11.5x faster than Ruby Sass
|
||||
* 1.1x faster than libsass
|
||||
* 1.7x faster than Dart Sass on Node
|
||||
* 10.6x faster than Ruby Sass
|
||||
|
||||
## Preceding Dense `@extend`
|
||||
|
||||
Running on a file containing `.bar {@extend .foo}` followed by 2^17 instances of `.foo {a: b}`:
|
||||
|
||||
* sassc: 2.033s
|
||||
* Dart Sass from a script snapshot: 2.380s
|
||||
* Dart Sass native executable: 2.398s
|
||||
* Dart Sass on Node.js: 6.523s
|
||||
* Ruby Sass with a hot cache: 29.717s
|
||||
* sassc: 2.290s
|
||||
* Dart Sass from a script snapshot: 2.476s
|
||||
* Dart Sass native executable: 2.566s
|
||||
* Dart Sass on Node.js: 5.399s
|
||||
* Ruby Sass with a hot cache: 29.002s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 1.2x slower than libsass
|
||||
* 2.7x faster than Dart Sass on Node
|
||||
* 12.4x faster than Ruby Sass
|
||||
* 1.1x slower than libsass
|
||||
* 2.1x faster than Dart Sass on Node
|
||||
* 11.3x faster than Ruby Sass
|
||||
|
||||
## Following Dense `@extend`
|
||||
|
||||
Running on a file containing 2^17 instances of `.foo {a: b}` followed by `.bar {@extend .foo}`:
|
||||
|
||||
* sassc: 2.065s
|
||||
* Dart Sass from a script snapshot: 2.312s
|
||||
* Dart Sass native executable: 2.256s
|
||||
* Dart Sass on Node.js: 6.760s
|
||||
* Ruby Sass with a hot cache: 28.755s
|
||||
* sassc: 2.317s
|
||||
* Dart Sass from a script snapshot: 2.381s
|
||||
* Dart Sass native executable: 2.461s
|
||||
* Dart Sass on Node.js: 5.481s
|
||||
* Ruby Sass with a hot cache: 29.197s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 1.1x slower than libsass
|
||||
* 3.0x faster than Dart Sass on Node
|
||||
* 12.7x faster than Ruby Sass
|
||||
* 2.2x faster than Dart Sass on Node
|
||||
* 11.9x faster than Ruby Sass
|
||||
|
||||
## Bootstrap
|
||||
|
||||
Running on a file containing 16 instances of importing the Bootstrap framework:
|
||||
|
||||
* sassc: 0.898s
|
||||
* Dart Sass from a script snapshot: 1.550s
|
||||
* Dart Sass native executable: 0.907s
|
||||
* Dart Sass on Node.js: 3.559s
|
||||
* Ruby Sass with a hot cache: 12.649s
|
||||
* sassc: 0.763s
|
||||
* Dart Sass from a script snapshot: 1.613s
|
||||
* Dart Sass native executable: 0.992s
|
||||
* Dart Sass on Node.js: 3.529s
|
||||
* Ruby Sass with a hot cache: 12.969s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* identical to libsass
|
||||
* 3.9x faster than Dart Sass on Node
|
||||
* 13.9x faster than Ruby Sass
|
||||
* 1.3x slower than libsass
|
||||
* 3.6x faster than Dart Sass on Node
|
||||
* 13.1x faster than Ruby Sass
|
||||
|
||||
## a11ycolor
|
||||
|
||||
Running on a file containing test cases for a computation-intensive color-processing library:
|
||||
|
||||
* sassc: 0.332s
|
||||
* Dart Sass from a script snapshot: 0.726s
|
||||
* Dart Sass native executable: 0.564s
|
||||
* Dart Sass on Node.js: 2.027s
|
||||
* Ruby Sass with a hot cache: 5.020s
|
||||
* sassc: 0.262s
|
||||
* Dart Sass from a script snapshot: 0.805s
|
||||
* Dart Sass native executable: 0.612s
|
||||
* Dart Sass on Node.js: 1.876s
|
||||
* Ruby Sass with a hot cache: 5.396s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 1.7x slower than libsass
|
||||
* 3.6x faster than Dart Sass on Node
|
||||
* 8.9x faster than Ruby Sass
|
||||
* 2.3x slower than libsass
|
||||
* 3.1x faster than Dart Sass on Node
|
||||
* 8.8x faster than Ruby Sass
|
||||
|
||||
## Susy
|
||||
|
||||
Running on a file containing test cases for the computation-intensive Susy grid framework:
|
||||
|
||||
* sassc: 0.290s
|
||||
* Dart Sass from a script snapshot: 0.649s
|
||||
* Dart Sass native executable: 0.225s
|
||||
* Dart Sass on Node.js: 1.293s
|
||||
* Ruby Sass with a hot cache: 1.506s
|
||||
* sassc: 0.244s
|
||||
* Dart Sass from a script snapshot: 0.673s
|
||||
* Dart Sass native executable: 0.248s
|
||||
* Dart Sass on Node.js: 1.361s
|
||||
* Ruby Sass with a hot cache: 1.576s
|
||||
|
||||
Based on these numbers, Dart Sass from a native executable is approximately:
|
||||
|
||||
* 1.3x faster than libsass
|
||||
* 5.7x faster than Dart Sass on Node
|
||||
* 6.7x faster than Ruby Sass
|
||||
* identical to libsass
|
||||
* 5.5x faster than Dart Sass on Node
|
||||
* 6.4x faster than Ruby Sass
|
||||
|
||||
# Prior Measurements
|
||||
|
||||
* [1.20.2](https://github.com/sass/dart-sass/blob/4b7699291c9f69533d25980d23b0647266b665f2/perf.md).
|
||||
* [1.13.4](https://github.com/sass/dart-sass/blob/b6ccc91a138e75420227ff79381c5f70e60254f1/perf.md).
|
||||
* [1.6.0](https://github.com/sass/dart-sass/blob/048cbe197a77e1cf4b837a40a5acb737e949fd5c/perf.md).
|
||||
* [1.0.0-alpha.8](https://github.com/sass/dart-sass/blob/be44245a849f2bb18b5ca1fc74f3043a36da17f0/perf.md).
|
||||
|
Loading…
Reference in New Issue
Block a user