Hacker News new | ask | show | jobs
by maccard 661 days ago
What do you use instead?

Iostream is… far bigger than this, for example.

3 comments

most platforms come with their own libraries for this, which are usually a mix of hand coded assembly and C. You #include the whole library/sdk, but the linker strips out all bits you don't use.

Even then, if you read the disassembled code, you can usually find within a few minutes looking some stupid/unused/inefficient code - so you could totally do a better job if you wrote the assembly by hand, but it would take much more time (especially since most of these architectures tend to have very irregular instruction sets)

If you’re just going to use the platform built in, then the size of a third party library doesn’t matter to you.
If you only have 2 kB of code space, you would likely be doing custom routines in assembly that do exactly what you need and nothing more.
Right - so no matter how small libfmt gets Op isn’t going to use it
I presume the sort of custom routines that GP described?