4 ms·
What about if you rerun the genetic algorithm with the fitness function being the size of the final compressed+gzipped file? Maybe that could counter-intuitive
by muxxa 14y ago
What about if you rerun the genetic algorithm with the fitness function being the size of the final compressed+gzipped file? Maybe that could counter-intuitively reorder the CSS so that there are more long runs of repetitive rules which result in an optimum final level of compression.
- friggeri 14y agoThis is more or less what I hint to at the end of the article, I did look at it very fast but it did not yield very interesting results. The way I see it that this might be related to the fact that there is really no link between the different genetic operators and the deflate algorithm. Anyways, I'd love to be proven wrong, in case anyone wants to fork the repo and try that.
- muxxa 14y agoHaven't run it yet, but a simple change to the cost function: https://github.com/eoghanmurray/css-bipartite-compression/commit/2da0a52cb4968959001acecd7ae3095717ea8534 https://github.com/eoghanmurray/css-bipartite-compression/co... Maybe the assumption to merge more frequently than to split doesn't hold with the new cost function.
- friggeri 14y agoYou might be onto something about the merge/split balance. Will definitely investigate in that direction.