Giter Club home page Giter Club logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
Hi,

I looked a bit into this, and you're right that it's not equal between the 
different compression algorithms. This is most likely because Compress() is 
used both for the comparative benchmarks and for the ones within Snappy itself; 
and for the latter, we don't want the performance numbers to be polluted with 
whatever malloc is in use. (I'm actually surprised it matters so much, but I'd 
guess it depends on your malloc.)

I think the right solution is actually the opposite of what you're proposing, 
though; remove the resize() calls from the other algorithms, not add them to 
Snappy. This would require a bit more logic on the outside, though (it would 
need to resize the buffer to something that gives sense for all the algorithms 
in use).

Original comment by [email protected] on 29 Mar 2011 at 10:27

  • Changed state: Accepted

from snappy.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
I don't particularly care which way the tester makes sure libraries have equal 
conditions, just that it does.

There is code to that effect:
      // Pre-grow the output buffer so we don't measure stupid string
      // append time
      compressed[b].resize(block_size * 2);

So the buffer should be large enough to satisfy any sane algorithm (and indeed 
LZO works with the resize commands removed). I don't have the other libraries 
besides zlib and lzo to test with, and zlib decompression for example doesn't 
work with just the resize command removed, so I hesitate to touch code I can't 
even test.

Original comment by [email protected] on 30 Mar 2011 at 3:00

from snappy.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
QuickLZ needs 36000 scratch bytes, though, so perhaps max(block_size * 2, 
block_size + 36000)?

Why can't you test the other libraries? They are all freely available.

Original comment by [email protected] on 30 Mar 2011 at 11:01

from snappy.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024

Original comment by [email protected] on 30 Mar 2011 at 12:45

  • Changed state: Started

from snappy.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
Fixed in r24.

Original comment by [email protected] on 30 Mar 2011 at 8:28

  • Changed state: Fixed

from snappy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.