← Back to context

Comment by rurban

3 years ago

null termination is not to be added to embed. embed adds a const sized buffer of unsigned bytes, not strings. files are not strings, files do contain \0.

and I still don't get why embed is so much better than xxd included buffers. it's more convenient sure, but 10x faster?

#embed is faster because it skips the parsing step. xxd generates source code tokens, which the parser must then decode back into bytes; embed just reads the bytes directly.