News for hackers. Stuff that matters.
Re:A little story about the `yes` Unix command by jepler on Thursday July 21, 2022 @10:07AM (#32179580)
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/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.

There are no comments on this comment yet.