Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyiostream improvements #61

Merged
merged 4 commits into from
Jan 22, 2023
Merged

Pyiostream improvements #61

merged 4 commits into from
Jan 22, 2023

Conversation

HDembinski
Copy link
Member

@HDembinski HDembinski commented Jan 22, 2023

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

  • GenEvent repr string is made more compact.

@HDembinski HDembinski merged commit d5d7706 into main Jan 22, 2023
@HDembinski HDembinski deleted the pyiostream_improvements branch January 22, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant