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

doc: clarify whether @time allocations include compilation #53992

Open
jariji opened this issue Apr 8, 2024 · 1 comment
Open

doc: clarify whether @time allocations include compilation #53992

jariji opened this issue Apr 8, 2024 · 1 comment
Labels
domain:docs This change adds or pertains to documentation

Comments

@jariji
Copy link
Contributor

jariji commented Apr 8, 2024

@time says

A macro to execute an expression, printing the time it took to execute, the number of allocations, and the total number of bytes its execution caused to be allocated, before returning the value of the expression.

It's not obvious to me whether compilation allocations are included in "execution" (is that the same as "evaluation"?).

@KristofferC
Copy link
Sponsor Member

This is also in the docs for @time:

In some cases the system will look inside the @time expression and compile some of the called code before execution of the top-level expression begins. When that happens,
some compilation time will not be counted. To include this time you can run @time @eval ....

@nsajko nsajko added the domain:docs This change adds or pertains to documentation label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

3 participants