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

Can't inline #14

Open
travisdowns opened this issue Mar 4, 2019 · 2 comments
Open

Can't inline #14

travisdowns opened this issue Mar 4, 2019 · 2 comments

Comments

@travisdowns
Copy link

travisdowns commented Mar 4, 2019

Since PCG is oriented towards speed, I thought I'd mention that as far as performance goes, not being able to inline the core functions like pcg32_random_r has a significant impact on speed. I'm getting around this by simply doing #include "pcg-basic.c" - yes, including the implementation file!

A usual solution is to declare the key functions static inline in the header file, then you don't have to mess around with "out of line" versions.

The more fully featured C library is able to be inlined.

@lemire
Copy link

lemire commented Mar 4, 2019

Can't LTO solve this? -flto? Gold linker, etc.

@travisdowns
Copy link
Author

travisdowns commented Mar 4, 2019 via email

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

2 participants