Various benchmarks to have feedback about PostCSS perfomance.
Made at Evil Martians, product consulting for developer tools.
All results below was run on Node 20.3.1, Github Actions:
Compare CSS processors for parsings, nested rules, mixins, variables and math:
PostCSS sync: 70 ms (1.0 times faster)
PostCSS: 72 ms
LibSass sync: 118 ms (1.6 times slower)
LibSass: 123 ms (1.7 times slower)
Less: 139 ms (1.9 times slower)
Dart Sass sync: 219 ms (3.0 times slower)
Dart Sass: 397 ms (5.5 times slower)
To get results on your environment:
pnpm install
pnpm test preprocessors
Compare CSS parsers written on JS:
Stylis: 15 ms (1.8 times faster)
CSSOM: 24 ms (1.2 times faster)
PostCSS: 28 ms
CSSTree: 37 ms (1.3 times slower)
Mensch: 37 ms (1.3 times slower)
Rework: 49 ms (1.8 times slower)
Stylecow: 73 ms (2.6 times slower)
PostCSS Full: 95 ms (3.4 times slower)
ParserLib: 153 ms (5.5 times slower)
Gonzales: 177 ms (6.4 times slower)
To get results on your environment:
pnpm install
pnpm test parsers
Compare vendor prefixes tools:
Lightning CSS: 12 ms (7.7 times faster)
Stylis: 18 ms (5.3 times faster)
Autoprefixer: 96 ms
Stylecow: 1009 ms (10.5 times slower)
To get results on your environment:
pnpm install
pnpm test prefixers