GithubHelp home page GithubHelp logo

Comments (6)

lemire avatar lemire commented on May 29, 2024

Most mainstream architectures being little endian, it may make sense to trade off performance in BE if this improves performance for the LE case.

I think that this is absolutely true. BE is a fringe requirement.

I bet that we have no BE user. It might be fine to have a fallback (slow) approach.

from roaring.

Oppen avatar Oppen commented on May 29, 2024

I think it's worth documenting in the README that BE is only supported as a fallback and will suffer degraded performance for some operations. Just to avoid surprises and spurious issues in the unlikely case someone chooses to user roaring there.

from roaring.

Oppen avatar Oppen commented on May 29, 2024

I'm working on a PR to try and test on ppc64. I could add a line in that same PR about it.

from roaring.

jacksonrnewhouse avatar jacksonrnewhouse commented on May 29, 2024

I believe https://github.com/RoaringBitmap/roaring/blob/master/serialization_generic.go does not assume endianness, hence the "generic" monicker. I also believe it to be correct, as that was what was being used on arm64 machines until we updated the build flags. Now, those arm64 machines are little endian, so there might be something else that breaks on BE, but the intent to support both is there, at least. The performance wasn't terrible using serialization_generic, but it did do many more allocations, as it couldn't do unsafe slice manipulations.

from roaring.

Oppen avatar Oppen commented on May 29, 2024

@jacksonrnewhouse that's not the code that runs for little endian. Despite saying it's generic, because it technically is, for little endian this is what gets built: https://github.com/RoaringBitmap/roaring/blob/master/serialization_littleendian.go

This performs better because it simply does unsafe casting of the slices, but is only valid on LE. It doesn't allocate or copy or call generic functions (those get inlined in practice tho, but all the rest is still overhead).

from roaring.

Oppen avatar Oppen commented on May 29, 2024

Regarding whether it is correct: we still need to test it, and we still prefer to update the build flags so LE use the LE-optimized path. We'll inevitably lag behind for some time when new archs come out, but that still is gonna happen and thus we'll still be skipping the generic code from tests.

from roaring.

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.