Skip to content

Remove unnecessary alloc#1

Open
w-utter wants to merge 2 commits intochomosuke:masterfrom
w-utter:remove-unnecessary-alloc
Open

Remove unnecessary alloc#1
w-utter wants to merge 2 commits intochomosuke:masterfrom
w-utter:remove-unnecessary-alloc

Conversation

@w-utter
Copy link

@w-utter w-utter commented Sep 14, 2024

Hello!

This should make things a bit quicker by removing all allocation from the hot loop, as well as acquiring the stdout lock on initalization.

stdout can still be a bit jumpy sometimes, that might be an issue with the shader idk 🤷

@chomosuke
Copy link
Owner

Thank you for that, will merge if you would seperate shader.rs into frame.rs and pixel.rs and also resolve the conflict :>

@w-utter
Copy link
Author

w-utter commented Sep 15, 2024

Sounds good, If it's going to be this big of a change from the original pr I think that the api might as well be changed a bit as well, with Frame having a write_to(&self, &mut impl std::io::Write) -> std::io::Result<usize> in its impl instead of having it be handled in the main.rs (mostly writing this for myself when I get the chance to update it)

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.

2 participants