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

add convert benchmarks #32

Merged
merged 3 commits into from
Oct 18, 2016
Merged

add convert benchmarks #32

merged 3 commits into from
Oct 18, 2016

Conversation

stevengj
Copy link
Contributor

Add convert benchmarks based on JuliaLang/julia#18954

@jrevels
Copy link
Member

jrevels commented Oct 18, 2016

Looks like Travis is failing to build Blosc due to a cert error, but only when testing v0.6 (happened in #33 as well)? Any idea what's going on there? EDIT: Ah, I see it's described in JuliaIO/Blosc.jl#28

@stevengj
Copy link
Contributor Author

Probably safe to merge this and #33, since the 0.6 failure is due to JuliaLang/julia#18997.

return a
end

x_int = rand(1:1000000,2000,2000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this 100 by 100 instead 2000 by 2000 (thus significantly increasing the number of samples taken within the time limit)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@stevengj
Copy link
Contributor Author

stevengj commented Oct 18, 2016

Decreasing the benchmark size shouldn't actually improve the statistics for the mean, it will just increase the variance, right? i.e. if it is the choice between benchmarking an operation 10x on a size-10000 array or 1000x on a size-100 array, in either case you have executed the underlying loop body the same number of times and should expect the same statistics for the mean, no? However, by doing the timing with finer granularity, you will get a larger variance.

@stevengj
Copy link
Contributor Author

Or does nanosoldier use the median rather than the mean?

@jrevels
Copy link
Member

jrevels commented Oct 18, 2016

Nanosoldier uses the minimum (a lot more detail on can be found in this paper). Furthermore, once I get time to fully implement hypothesis testing in BenchmarkTools, it will be important that the sample sizes are large enough to characterize an underlying timing distribution.

A less rigorous reason: it seems, from my experience, that benchmarks that touch/use less memory are less prone to the mysterious "erroneous" timing offsets we've seen on Nanosoldier in practice (which I believe are memory-related in nature, though I haven't pinned the exact cause down yet).

@jrevels jrevels merged commit 7584a46 into master Oct 18, 2016
@stevengj stevengj deleted the convert-int branch October 18, 2016 23:55
@stevengj
Copy link
Contributor Author

That's good. (FFTW's benchmarks have always used the minimum as well, for much the same reason, but we never formally studied the statistics.)

@stevengj
Copy link
Contributor Author

stevengj commented Oct 19, 2016

See also here on FFTW's benchmarking methodology. Actually, we take the minimum of several averages, so it's not quite the same.

@stevengj
Copy link
Contributor Author

stevengj commented Oct 19, 2016

LMbench also used a minimum to avoid noise. There is probably some other literature as well that you and @jiahao should take a look at for any future version of your work, although probably you guys did the most detailed statistical study.

@vchuravy
Copy link
Member

Maybe worth having scalar version of these? I was originally thinking that these would be to fast, but since JuliaCI/BenchmarkTools.jl#23 is merged that shouldn't be a problem anymore.

@stevengj
Copy link
Contributor Author

A scalar version seems somewhat redundant; it seems like we just need one or the other.

@jrevels jrevels mentioned this pull request Nov 8, 2016
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

Successfully merging this pull request may close these issues.

3 participants