3 ms·
> Why does yoyoland need to use libc’s memcpy? Can’t you just use __builtin_memcpy? Unless you do special things, the compiler turns __builtin_memcpy into a ca
by pizlonator 1y ago
> Why does yoyoland need to use libc’s memcpy? Can’t you just use __builtin_memcpy?
Unless you do special things, the compiler turns __builtin_memcpy into a call to memcpy. :-)
There is __builtin_memcpy_inline, but then you're at the compiler's whims. I don't think I want that.
A faithful implementation of what you're proposing would have the Fil-C runtime provide a memcpy function so that whenever the compiler wants to call memcpy, it will call that function.
> On Linux, if all you need is syscalls, you can just write your own syscall wrapper-like Go does.
I could do that. I just don't, right now.
You're totally right that I could remove the yolo libc. This is one of like 1,000 reasons why Fil-C is slower than it needs to be right now. It's a young project so it has lots of this kind of "expedient engineering".