3 ms·
Erg, but soon the Virgil GC will have to support pinning, because you can directly call the kernel to do I/O with on-heap byte arrays. Currently I get away with
by titzer 4y ago
Erg, but soon the Virgil GC will have to support pinning, because you can directly call the kernel to do I/O with on-heap byte arrays. Currently I get away with that because Virgil is single-threaded only, but that's gotta change for Wizard to compete with more advanced VMs.
- ErikCorry 4y agoMemcpy is fast. Don't let them pin your arrays.
- titzer 4y agoWith syscalls you can mmap the ethernet controller's DMA region and write directly to it; zero copy to the wire and back. In Virgil, there's literally no restriction on what Linux syscalls you can do, so why not that too. Though, Range<byte> of off-heap memory (a new Virgil feature implemented with fat pointers), is probably better; you don't even have to leave the memory-safe core language to manipulate off-heap data.
- ErikCorry 4y agoToit calls this external byte arrays, but whether it's a fat pointer or a small object is an implementation detail.