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

use const Refs instead of mutable structs #61

Closed
thraen opened this issue May 27, 2020 · 4 comments
Closed

use const Refs instead of mutable structs #61

thraen opened this issue May 27, 2020 · 4 comments

Comments

@thraen
Copy link
Contributor

thraen commented May 27, 2020

Hi!

Thanks for the repo!

While profiling, I found that all calls to gl function wrappers allocate a bit of memory. The allocation seems to come with the pointer wrapper type GLFunc.

I found that there is no allocation when const Refs are used to store the pointers.

I tested this a bit in a branch, it actually seemed to speed up my code a bit. If you're interested, I can make a pull request.

@SimonDanisch
Copy link
Member

Cool sounds good to me :) This code is super old, so not surprising that something may have changed.

@thraen
Copy link
Contributor Author

thraen commented May 28, 2020

Yes, I could have sworn that the amount of allocation due to the structs even changed between 1.2 and 1.4. .. Anyways :) #62

@thraen
Copy link
Contributor Author

thraen commented Jun 3, 2020

The merge request seems to fail because of unrelated CI problems? Is there something I can do?

@SimonDanisch
Copy link
Member

I guess I'd mainly just want to test this on Makie, and if that works fine merge & tag it ;)

@musm musm closed this as completed Apr 28, 2021
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

No branches or pull requests

3 participants