Giter Club home page Giter Club logo

Comments (6)

cowtowncoder avatar cowtowncoder commented on July 21, 2024

Thanks, I will try (micro)benchmarking this. It is difficult to say for sure, given how much hotspot rearranges things, but I agree in that conditional expressions can be much more costly (due to branching etc).

from compress.

cowtowncoder avatar cowtowncoder commented on July 21, 2024

Hmmh. Replacement with byte masking (I hate java's signed bytes...) becomes something more like:

                || (((in[ref] & 0xFF) << 8) | (in[ref+1] & 0xFF)) != ((hash >> 8) & 0xffff)) {

which unfortunately is bit slower on my tests...

from compress.

thomasmueller avatar thomasmueller commented on July 21, 2024

You are right, in my code I also have "& 255" I wonder why I forgot it here.

I guess the reason why it is a bit faster on my machine is that I have different test data.

from compress.

cowtowncoder avatar cowtowncoder commented on July 21, 2024

Ok. Which test file(s) did you use? I have simplest of tests under src/test/java/perf/ManualPerfComparison.java which I used on just one of compression files.

from compress.

thomasmueller avatar thomasmueller commented on July 21, 2024

I used the data I need to compress in my case, which is database page data (from the H2 database).

I guess it would be better to optimize performance for a more common mix of data, for example the test data benchmarks: http://github.com/ning/jvm-compressor-benchmark/wiki

from compress.

cowtowncoder avatar cowtowncoder commented on July 21, 2024

Yeah I use test data from that test benchmark. Actually if you know of additional data sets I could also those to jvm-compressor-becnhmark. I do believe that there may be improvements to do for compress side, for what that's worth, just need to figure out good ordering for test etc.

But I also need to occasionally compare performance between versions; I did this to check how 0.7 and 0.8.5 compare (and determine there's 10-15% improvement for uncompress).

from compress.

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.