Giter VIP home page Giter VIP logo

Comments (3)

fordp2002 avatar fordp2002 commented on August 22, 2024 1

Thanks for this, it is great that you are willing to make improvements!

from rapidcsv.

d99kris avatar d99kris commented on August 22, 2024

Thank you, I'll try add some performance test(s) to this project and check if your suggestion applies across platforms, and change the code accordingly.

Generally speaking on performance there's a trade-off between the "simplicity" of the API vs. raw throughput, and rapidcsv (despite its name) focuses on ease-of-use (and enabling rapid development). So I'm pretty sure there are other CSV libraries which are faster out there (but leaving more work to the application code).

Anyway, you seem to have found a good low-level improvement (not affecting API usability) which I'm happy to include if I can confirm the results on my systems. I would have thought a decent compiler would produce similar code for those two lines, but that assumption seem to be wrong.

from rapidcsv.

d99kris avatar d99kris commented on August 22, 2024

Thanks @fordp2002 - I can confirm the suggested improvement applies for all three major platforms (Linux, Mac, Windows). Measurement data for ptest002.cpp (which essentially just loads a CSV file) before and after fix are provided below. Will proceed to merge the fix.

Linux: before 53.4 ms --> after 37.9 ms
Mac: before 72.4 ms --> after 30.2 ms
Windows: before 33.5 ms --> after 10.7 ms

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.