Code Monkey home page Code Monkey logo

Comments (2)

derekmauro avatar derekmauro commented on June 9, 2024

I'm not sure the typical use cases for FixedArray are cases for which having a swap method makes sense. FixedArray is usually used for putting a small array on the stack, but with an extent determined at runtime. How does swapping two FixedArrays of differing sizes that are backed with stack memory work? I suspect if you are trying to swap, absl::InlinedVector is a better choice. Can you describe the use case?

from abseil-cpp.

leissa avatar leissa commented on June 9, 2024

My use case is that I need a lot of usually very small arrays which don't need to be resizable and I thought that absl::FixedArray would be a nice fit for that. absl::InlinedVector has the extra capacity that I don't need. But since you can't swap an absl::FixedArray you can't really use that thing for pretty much anything besides local variables.

from abseil-cpp.

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.