3 ms·
Eh, even on this example, most of the gains come from simply removing the comments (something that can easily be done with `cpp -E -P <in.css >out_cpp.css` or r
by a-french-anon 2y ago
Eh, even on this example, most of the gains come from simply removing the comments (something that can easily be done with `cpp -E -P <in.css >out_cpp.css` or regexps since CSS doesn't allow comment nesting) on most UNIXes.
Here's a more complete result adding brotli and the aforementioned cpp version:
$ gdu -b *.css *.css.gz *.css.br | awk '{if (NR % 3 == 1) {ref = $1; print} else print $0, "(" $1 - ref ")"}'
623 in.css
197 out.css (-426)
355 out_cpp.css (-268)
345 in.css.gz
185 out.css.gz (-160)
235 out_cpp.css.gz (-110)
284 in.css.br
141 out.css.br (-143)
177 out_cpp.css.br (-107)
- sionisrecur 2y agocpp as in a C preprocesor? That's a neat trick. I guess it removes what looks like /* comments */ and leaves the rest alone?