Coder Social home page Coder Social logo

comparing to #embed about embed HOT 3 CLOSED

johannes-graeter avatar johannes-graeter commented on August 20, 2024
comparing to #embed

from embed.

Comments (3)

MKlimenko avatar MKlimenko commented on August 20, 2024

Hi Johannes,

Personally, I'd use the standard way, that way you'll get rid of an extra step in the build procedure.
However, looks like no compiler supports #embed so far, but I haven't been following that lately. Some sort of custom trunk was once live on Compiler Explorer, but it might be down now.

My library was inspired by std::embed proposal of the same author, but (long story short) this functionality landed in plain C first. Therefore, I designed it to be a resourse- rather than an array of bytes-oriented to be more C++ish.

It worked pretty well on my previous job for storing the binary images of the heterogeneous device programs, we integrated it into CMake as a pre-build step, so as a conclusion I'd say that it's pretty straightforward tool to use until we have a standard way.

from embed.

johannes-graeter avatar johannes-graeter commented on August 20, 2024

Oh yeah you are right no compiler support for it currently. Although there is an active PR in Clang so perhaps we'll get it soon. llvm/llvm-project#68620
In the mean time l will happily employ yours :)

from embed.

MKlimenko avatar MKlimenko commented on August 20, 2024

It's a good idea to compare the performance against the native embed, and probably even create a PR with some performance improvement.
I'll do it once this support lands in Clang, but let me close this issue for now.

from embed.

Related Issues (3)

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.