3 ms·
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
by rurban 4y 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?
- marssaxman 4y ago#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.
- riking 4y agoMultiple big-O steps faster.
- account42 4y agoThat's not how big-O works.