sisl / GridInterpolations.jl

Multidimensional grid interpolation in arbitrary dimensions
Other
52 stars 12 forks source link

Improved benchmarking using BenchmarkTools #31

Closed mattuntergassmair closed 4 years ago

mattuntergassmair commented 4 years ago

Not sure what exactly the current benchmarking script is benchmarking, but I tried to reverse-engineer the benchmark code and use BenchmarkTools instead.

If we agree on the new benchmarking function, interpBenchmarks.jl could be deleted.

Also, in the current setup the condition

        abs(nPointsPerDim^i - nPoints) > marginoferror*nPoints

evaluates to false for i > 6 (but it is run for i=1:1000 from compareSpeedUp(1000,...)), where i is the variable representing nDims. The new version only loops for i=1:6.

More input on how to improve the benchmarking functionality is welcome.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 95.798% when pulling 7e9abddbf5623d0190b13e971a29a608ddc42d59 on mattuntergassmair:improved_benchmarking into dfcc80109672a687737e9bacf1d12c5eea863343 on sisl:master.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 95.798% when pulling 2a88485630cab8afc70b165a5a7acd952480df18 on mattuntergassmair:improved_benchmarking into dfcc80109672a687737e9bacf1d12c5eea863343 on sisl:master.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 95.798% when pulling 2a88485630cab8afc70b165a5a7acd952480df18 on mattuntergassmair:improved_benchmarking into dfcc80109672a687737e9bacf1d12c5eea863343 on sisl:master.

mykelk commented 4 years ago

Don't we need to add BenchmarkTools to the project file in some way?

mattuntergassmair commented 4 years ago

Don't we need to add BenchmarkTools to the project file in some way?

good point, I guess it depends on whether or not we consider the benchmark files as part of the project. If the benchmarking is only used for introspection, we may not need to add its dependencies, right? Or maybe even have a separate Project.toml for the bench/ folder?

mykelk commented 4 years ago

You'll want to follow the instructions here.

rejuvyesh commented 4 years ago

@mattuntergassmair you are right, you can create a separate Project.toml in the bench folder. You can also add it to the [extras] section otherwise.

mattuntergassmair commented 4 years ago

Ok, added a Project.toml file to the benchmark folder