Git Product home page Git Product logo

Comments (6)

wovo avatar wovo commented on July 22, 2024 1

from hwlib.

wovo avatar wovo commented on July 22, 2024

from hwlib.

Xenoamor avatar Xenoamor commented on July 22, 2024

Hi Wouter, I think you might have misunderstood me. It is correct to have the keyword override but it would be beneficial to also have the keyword final.
If you do then the compiler can de-virtualise it and remove the overheads associated with it. You'll see this optimisation occurring in the godbolt link above also

I'd also like to add that I saw your talk on youtube from a recommendation on Reddit and would like to thank you for it! It's been a great help in selling me on moving to C++

from hwlib.

Xenoamor avatar Xenoamor commented on July 22, 2024

Awesome, it'll be interesting to know if it becomes as fast as a templated version. I imagine link time optimisation might be needed for that though

from hwlib.

wovo avatar wovo commented on July 22, 2024

from hwlib.

Xenoamor avatar Xenoamor commented on July 22, 2024

Yes I see this now, I've played around with it in godbolt and you only get the savings from final if you are directly calling the final class. If you call anything above you get the intermediate objects as you say.

I'll have a look at godafoss when I get some free time!

from hwlib.

Related Issues (18)

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.