Skip to content

Can't inline #14

@travisdowns

Description

@travisdowns

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions