-
Notifications
You must be signed in to change notification settings - Fork 0
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
Optimize model fit to avoid allocations in hot loops #28
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
+ Coverage 95.10% 95.49% +0.39%
==========================================
Files 10 10
Lines 449 555 +106
==========================================
+ Hits 427 530 +103
- Misses 22 25 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
For some reason the usage of using GeoStatsModels
using GeoStatsFunctions
using GeoTables
using Meshes
using BenchmarkTools
data = georef((; z=[1.0, 0.0, 1.0]), [(25.0, 25.0), (50.0, 75.0), (75.0, 50.0)])
grid = CartesianGrid(100, 100)
model = NN()
# model = IDW()
# model = LWR()
# model = Polynomial()
# model = Kriging(SphericalVariogram())
@benchmark GeoStatsModels.fitpredict($model, $data, $grid, maxneighbors=3) The benchmark results are shown below:
@eliascarv do you know what might be causing this? Perhaps the change to EDIT: the change to |
@juliohm, can you check the type stability in |
@eliascarv the output of Even the benchmarks for |
Introduce
fit!
to update model's state in place.