Skip to content

Skip zero-initializing memory. #8

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Skip zero-initializing memory. #8

wants to merge 2 commits into from

Conversation

Anteru
Copy link

@Anteru Anteru commented May 20, 2025

The memory in question here is immediately overwritten, so no need to initialize to zero. Saves ~3.5% load time. I've put it into a class (HeapArray) for simpler RAII; here we could also allocate inline (I think) using new/delete because nobody is making copies anyways.

Before:

Stalled loading: 4102.03ms
Played back in: 4340.01ms

After:

Stalled loading: 3969.49ms
Played back in: 4206.71ms

Anteru added 2 commits May 20, 2025 10:33
The memory in question here is immediately overwritten, so no need to
initialize to zero. Saves ~3.5% load time.

Before:

Stalled loading: 4102.03ms
Played back in: 4340.01ms

After:

Stalled loading: 3969.49ms
Played back in: 4206.71ms
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