Coder Social home page Coder Social logo

std::string_view support about rapidcsv HOT 3 CLOSED

IlannM avatar IlannM commented on May 24, 2024
std::string_view support

from rapidcsv.

Comments (3)

d99kris avatar d99kris commented on May 24, 2024

Hi @IlannM - are you proposing the rapidcsv API to provide functions returning/accepting std::string_view, or are you referring to the internal data representation of a CSV document in the library?

I have previously done some study implementing "my own string_view" for internal data representation and I did not observe any measurable performance improvement. The reason is likely that std::string can store typical cell sizes without extra memory allocation, but I haven't investigated it further. Memory usage should be reduced though, but I'm not sure it warrants bumping the C++ requirement to 17 (nor maintaining two "backends" - one for C++11 and one for >= C++17).

from rapidcsv.

IlannM avatar IlannM commented on May 24, 2024

yes, I am referring to the API returning and accepting the std::string_view type.

from rapidcsv.

d99kris avatar d99kris commented on May 24, 2024

Thanks for clarifying.

I think the performance benefit for using std::string_view in the API's is small, given the fact that most CSV data cells are small.

I think if I eventually change rapidcsv to use string_view internally, I'll profile the performance and see if we should add such APIs.

For now I'll close this issue.

from rapidcsv.

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.