New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework vs Postcss speed bench #64
Comments
Yeap, now PostCSS made few RegExp match on every node parsing to split spaces correctly. I think with tokenaize step before I can reduce RegExp and allow to autodetect at-rule content #41 |
PostCSS will not be faster that Rework, but tokenizer get some speed boost. Current:
My private tokenizer branch:
|
Awesome news ! |
|
Good news, everyone! @Termina1 made really amazing work and speed up new tokenizer branch. PostCSS 3.0 will be fatser, that Rework. Current PostCSS 2.x:
New tokenizer branch with @Termina1 fixes:
|
That's some really awesome news! |
|
Very good job |
|
Unfortunately, es6-transpiler has side effects and as I found out it slow down some JS code (mostly CSSOM and Rework). Currect
Also I start to use Bootstrap CSS, because it has whitespaces and comments indead of GitHub CSS. And now benchmark contains Stylecow. |
BTW, I suggested to @brainopia and @Termina1 2 boutles of Ruby porto award if they will increase PostCSS perfomance for 2 times (to 30-40 ms for parsing Bootstrap). Maybe somebody want to join this competition? ;) |
I disable
|
You will not belive, but @brainopia won perfomance contest! The new tokenizer is incredibly fast! PostCSS 3 become the fastest CSS parser, written on JS! We are about 20 % faster, that even CSSOM and about 3 times faster, that Rework (don’t forget, that we still parse and store whitespaces).
|
This is so fucking cool. Thank you guys !! |
you guys rocks ! congrats @brainopia |
Awesome! Although, I guess PostCSS is still partial parser (got this definition from the Stoyan's talk here), as it won't parse all the stuff (all the simpleselectors, contents of But whatever. Impressive work is going on there! |
@kizu yeap, Gonzales parses more :). |
PostCSS 3.0 with new parser was released today. Please, test :). |
I add benchmark with preprocessors parsers: dce2f3e PostCSS is few times faster even that libsass:
|
This kind of bench should be done with some plugins added. For example you should consider use cssnext to compare sass & friends ;) |
@MoOx there is no cssnext features in Sass ;). Maybe when I add Sass style variables and |
I mean that making bench with a parser (postss) & parser + features (sass, less etc) doesn't really make sense. cssnext that use postcss add some features like vars, math, custom media etc. so it's a bit more logic to compare old preproc to cssnext, more that comparing them to postcss only. |
@MoOx I agree, but cssnext vs Sass doesn’t make sense too ;). Correct benchmark should use same features. |
@MoOx hm. But maybe you are right. Even if test CSS will not contains cssnext features, cssnext AST lookups will make benchmark little better. |
Even if cssnext doesn't have mixins/if/loops, you have similar features like vars, math, color manipulations. It's better than nothing ^^ |
This kind of bench are just sort of "just to let you know" :D |
Yeap, I updated benchmark: 7b0e467
|
You should add the output to a file like BENCHMARKS.md or something like that & update it on each release to make this even more cool :) |
@MoOx maybe yu know some service, that can run benchmarks on every commit and output graph of perfomance? |
we can probably update your task to save the output + run the task on the prepublish npm script ? |
and where we will store results and print graph? |
I think the evolution is not the most interesting thing. |
@MoOx I want this graph for PostCSS developers to prevent perfomance regression :) |
Oh yeah. But that would be another problem. Can be drawn from collecting git history values on the versionned bench output ? |
I'm curious to know if speed diff with rework is it's just because of keeping use whitespace & coding style.
https://gist.github.com/MoOx/1b0d7d2bd987e0735e0e
Any comment ?
The text was updated successfully, but these errors were encountered: