Git Product home page Git Product logo

Comments (8)

cclauss avatar cclauss commented on May 3, 2024

Would these changes make the code run faster or reduce the size of the executables?

from c-plus-plus.

htr751 avatar htr751 commented on May 3, 2024

Some of them actually will make it faster. For example, if you made linked list as a class (and not as global methods) than as part of adding constructors you could add move consturctor which in case you want to transfer ownership of the list to some other list is much faster than copying it. I know its not part of the data stracture implementation but the all point in making it in multiple languages is to show how to implement such things in different languages isn't it (and in such case I think it's important to use best practices when implementing it)?

Another example is using smart pointers like unique_ptr to handle ownership of memory in your code. While this won't make it faster (nor will make it slower) it will save you the need to delete all the allocated on the heap pointers and it will make the code more beautifull.

from c-plus-plus.

cclauss avatar cclauss commented on May 3, 2024

My recommendation is that we take an algorithm-by-algorithm approach to such a conversion where each pull request modifies only one algorithm and demonstrates that the algorithm is faster, easier to understand, or generates less code than the current version. Side-by-side benchmarks are much appreciated to demonstrate the efficacy of the new approach.

from c-plus-plus.

ayaankhan98 avatar ayaankhan98 commented on May 3, 2024

with the new versions of C++ i observed one thing, earlier i was using C++14 to write codes for codeforces and Codechef problems and on submissions those codes are takiing memory of about 15M but when i compiled those same codes using -std=c++17 flag the memory consumed is decreased to 5M,
i think it will be a good idea to use the C++17 standard

from c-plus-plus.

offamitkumar avatar offamitkumar commented on May 3, 2024

I would like to work on it. Please assign this to me.

from c-plus-plus.

cclauss avatar cclauss commented on May 3, 2024

Please read CONTRIBUTION.md. This repo does not assign tasks to people. Instead it accepts pull requests.

from c-plus-plus.

offamitkumar avatar offamitkumar commented on May 3, 2024

still my pull request for #789 is not accepted. How I'm Supposed to contribute further, As per rule one cpp change per commit.

from c-plus-plus.

kvedala avatar kvedala commented on May 3, 2024

I think this can be closed now. The C++ standard for compilation, etc have been standardized for each and every file and tested on three platforms.

C++11, though old, allows to implement the algorithms from the repo directly on small microcontrollers running on RTOS and not relying on linux or other larger OS kernels.

from c-plus-plus.

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.