View Single Post
Old 5th August 2020, 15:43   #3  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by nevcairiel View Post
Did you open the pipe in binary mode, to avoid any crazy overhead from Windows processing the stream in text mode?
It's actually native Win32 code, so I'm using ReadFile() and WriteFile() directly, thus bypassing the C library (and any text/binary conversion) completely.

Anyway, today I create a little helper application that launches two sub-processes and connects them via pipe. Because, this way, the creation of the pipe is under my control, I can choose the buffer size.

Turns out that this command, in the Windows command prompt, results in ~1.1 GiB/s:
mkpipe.exe generator.exe "|" native_pv.exe > NUL

(Pipe buffer size was set to 1 MiB)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 6th August 2020 at 17:13.
LoRd_MuldeR is offline   Reply With Quote