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

@belapsed expression doesn't work on Julia 0.7 #59

Closed
giordano opened this issue May 26, 2017 · 4 comments
Closed

@belapsed expression doesn't work on Julia 0.7 #59

giordano opened this issue May 26, 2017 · 4 comments

Comments

@giordano
Copy link
Member

giordano commented May 26, 2017

On Julia 0.7 @belapsed expression, without keyword arguments, doesn't work:

julia> @belapsed sin(1)
ERROR: ArgumentError: tuple must be non-empty

julia> @belapsed sin(1) evals = 3
1.2999999999999999e-11

No problem with Julia 0.5.

Note that the first one isn't tested in test/ExecutionTests.jl.

BTW, isn't 1.3e-11 a bit too low as elapsed time? On Julia 0.5, same machine (a laptop equipped with an Intel i7 CPU) time is of the order 1.2e-8, which looks more reasonable.

@giordano
Copy link
Member Author

I'm starting to think that @belapsed is a bit broken on Julia 0.7:

julia> @belapsed sleep(0.5) evals = 3
1.2999999999999999e-11

julia> @btime sleep(0.5) evals = 3
  501.583 ms (5 allocations: 192 bytes)

@giordano
Copy link
Member Author

@belapsed was probably broken by JuliaLang/julia#21746. I'm not sure how to fix this in a backward compatible way.

@StefanKarpinski
Copy link

I'm not sure how to fix this in a backward compatible way.

The nuclear option is a conditional definition based on VERSION.

@jrevels
Copy link
Member

jrevels commented Nov 10, 2017

closed by #77

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