<feed xmlns='http://www.w3.org/2005/Atom'>
<title>metronode/server/flate_test.go, branch optiflate</title>
<subtitle>minecraft classic/CPE server
</subtitle>
<link rel='alternate' type='text/html' href='https://git.citrons.xyz/metronode/'/>
<entry>
<title>benchmark custom DEFLATE compressor</title>
<updated>2026-03-28T00:07:30+00:00</updated>
<author>
<name>raven</name>
<email>citrons@mondecitronne.com</email>
</author>
<published>2026-03-28T00:06:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.citrons.xyz/metronode/commit/?id=b35dec2b4625ad85c0999a4c59a2f05d4eb06d82'/>
<id>b35dec2b4625ad85c0999a4c59a2f05d4eb06d82</id>
<content type='text'>
BenchmarkNaiveGzip
    flate_test.go:47: compressed empty to 1043631 bytes
    flate_test.go:47: compressed debug to 1043939 bytes
    flate_test.go:47: compressed flat to 1043648 bytes
    flate_test.go:47: compressed sphere to 4981910 bytes
    flate_test.go:72: naive gzip compressor completed in 24.744500019s
BenchmarkDeflate
    flate_test.go:47: compressed empty to 13525844 bytes
    flate_test.go:47: compressed debug to 13526111 bytes
    flate_test.go:47: compressed flat to 13525852 bytes
    flate_test.go:47: compressed sphere to 19927269 bytes
    flate_test.go:77: custom deflate compressor completed in 546.099782ms

the standard gzip compressor is almost 40 times slower, but it requires around
a tenth of the network bandwidth. so, it would seem that, since the internet is
slower than CPUs, standard gzip wins out probably.

the custom compressor may gain an advantage if huffman trees are actually
implemented. however, I'm going to focus on other things for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BenchmarkNaiveGzip
    flate_test.go:47: compressed empty to 1043631 bytes
    flate_test.go:47: compressed debug to 1043939 bytes
    flate_test.go:47: compressed flat to 1043648 bytes
    flate_test.go:47: compressed sphere to 4981910 bytes
    flate_test.go:72: naive gzip compressor completed in 24.744500019s
BenchmarkDeflate
    flate_test.go:47: compressed empty to 13525844 bytes
    flate_test.go:47: compressed debug to 13526111 bytes
    flate_test.go:47: compressed flat to 13525852 bytes
    flate_test.go:47: compressed sphere to 19927269 bytes
    flate_test.go:77: custom deflate compressor completed in 546.099782ms

the standard gzip compressor is almost 40 times slower, but it requires around
a tenth of the network bandwidth. so, it would seem that, since the internet is
slower than CPUs, standard gzip wins out probably.

the custom compressor may gain an advantage if huffman trees are actually
implemented. however, I'm going to focus on other things for now.
</pre>
</div>
</content>
</entry>
</feed>
