4 ms·
This 'yes' implementation in Python also gets to the GB/s range on Linux, approximately on par with gnu yes: https://gist.github.com/jepler/5e46f4e46542367d75cd
by jepler 4y ago
This 'yes' implementation in Python also gets to the GB/s range on Linux, approximately on par with gnu yes: https://gist.github.com/jepler/5e46f4e46542367d75cde9d77d5865fe https://gist.github.com/jepler/5e46f4e46542367d75cde9d77d586...
It takes the useful insights from this article and packages them back into a Python program. But there's so little actual Python code running that the efficiency relative to a compiled language is swamped by all the data copying to the kernel.
vmsplice()ing is probably the next step in speed, however, vmsplice apparently doesn't fit well into the semantics of python (or probably rust) programs. trying to reduce the number of python bytecodes by calling `os.writev(1, many_bufs)` actually harmed performance, not sure why.