The HepMC3 code expects \n as linefeed character, even on Windows. To improve performance, we let Python read the raw bytestream and correct \r\n to \n in pyiostream, by manipulating the view on the internal buffer.
I previously used rewrite large parts of the internal buffer to perform this replacement, but now I manipulate only a few bytes and skip characters by manipulating the view. The new version should be faster.
Make pyiostream faster on Windows.
The HepMC3 code expects
\n
as linefeed character, even on Windows. To improve performance, we let Python read the raw bytestream and correct\r\n
to\n
in pyiostream, by manipulating the view on the internal buffer.I previously used rewrite large parts of the internal buffer to perform this replacement, but now I manipulate only a few bytes and skip characters by manipulating the view. The new version should be faster.
Other changes