diff --git a/.cargo/config.toml b/.cargo/config.toml index db774ec..51372ae 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [target.'cfg(any(target_arch = "x86_64", target_arch = "x64"))'] -rustflags = ["-C", "target-feature=+avx2,+fma"] +rustflags = ["-C", "target-cpu=x86-64-v3"] diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ac91e3..00b3543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.8.2 2025-11-12 + +### Changed + +* Use `x86-64-v3` reference CPU as compilation target instead of manually specifying features + * Includes AVX2 and vector FMA + ## 0.8.1 2025-11-10 ### Added diff --git a/Cargo.lock b/Cargo.lock index ddd7588..2f81a1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "interpn" -version = "0.8.1" +version = "0.8.2" dependencies = [ "criterion", "crunchy", diff --git a/Cargo.toml b/Cargo.toml index b37a25a..3871c27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "interpn" -version = "0.8.1" +version = "0.8.2" edition = "2024" authors = ["James Logan "] license = "MIT OR Apache-2.0" diff --git a/benches/bench_cpu.py b/benches/bench_cpu.py index 2865992..c1871d0 100644 --- a/benches/bench_cpu.py +++ b/benches/bench_cpu.py @@ -469,7 +469,7 @@ def _plot_speedup_vs_dims( yanchor="top", ), height=450, - margin=dict(t=60, l=60, r=200, b=90), + margin=dict(t=60, l=60, r=20, b=90), # legend=dict( # orientation="v", # yanchor="top", diff --git a/docs/1d_quality_of_fit_Rectilinear.html b/docs/1d_quality_of_fit_Rectilinear.html index 664b98d..980ef49 100644 --- a/docs/1d_quality_of_fit_Rectilinear.html +++ b/docs/1d_quality_of_fit_Rectilinear.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/1d_quality_of_fit_Rectilinear.svg b/docs/1d_quality_of_fit_Rectilinear.svg index 72b738e..6e33a20 100644 --- a/docs/1d_quality_of_fit_Rectilinear.svg +++ b/docs/1d_quality_of_fit_Rectilinear.svg @@ -1 +1 @@ -05−1−0.500.51−1−0.500.51−202−200μ−100μ0−202−0.200.2−202−2−1.5−1−0.50DataInterpNSciPyInterpN ErrorSciPy ErrorComparison — InterpN vs. Scipy w/ Cubic InterpolantRectilinear Gridxxxf(x)ErrorQuadraticSineStepError, QuadraticError, SineError, Step \ No newline at end of file +05−1−0.500.51−1−0.500.51−202−200μ−100μ0−202−0.200.2−202−2−1.5−1−0.50DataInterpNSciPyInterpN ErrorSciPy ErrorComparison — InterpN vs. Scipy w/ Cubic InterpolantRectilinear Gridxxxf(x)ErrorQuadraticSineStepError, QuadraticError, SineError, Step \ No newline at end of file diff --git a/docs/1d_quality_of_fit_Regular.html b/docs/1d_quality_of_fit_Regular.html index 5101a5f..348df9d 100644 --- a/docs/1d_quality_of_fit_Regular.html +++ b/docs/1d_quality_of_fit_Regular.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/1d_quality_of_fit_Regular.svg b/docs/1d_quality_of_fit_Regular.svg index 6714c39..cdfb92e 100644 --- a/docs/1d_quality_of_fit_Regular.svg +++ b/docs/1d_quality_of_fit_Regular.svg @@ -1 +1 @@ -05−1−0.500.51012−202−10f−5f0−202−0.200.2−202012DataInterpNSciPyInterpN ErrorSciPy ErrorComparison — InterpN vs. Scipy w/ Cubic InterpolantRegular Gridxxxf(x)ErrorQuadraticSineStepError, QuadraticError, SineError, Step \ No newline at end of file +05−1−0.500.51012−202−10f−5f0−202−0.200.2−202012DataInterpNSciPyInterpN ErrorSciPy ErrorComparison — InterpN vs. Scipy w/ Cubic InterpolantRegular Gridxxxf(x)ErrorQuadraticSineStepError, QuadraticError, SineError, Step \ No newline at end of file diff --git a/docs/2d_quality_of_fit_Rectilinear.html b/docs/2d_quality_of_fit_Rectilinear.html index 7f88674..de9434c 100644 --- a/docs/2d_quality_of_fit_Rectilinear.html +++ b/docs/2d_quality_of_fit_Rectilinear.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/2d_quality_of_fit_Rectilinear.svg b/docs/2d_quality_of_fit_Rectilinear.svg index af8471e..ff77900 100644 --- a/docs/2d_quality_of_fit_Rectilinear.svg +++ b/docs/2d_quality_of_fit_Rectilinear.svg @@ -1 +1 @@ -Sampled data1020304050−0.00200.002Quadratic Test Function w/ Cubic InterpolantRectilinear GridTruthInterpNSciPyError, InterpNError, SciPy \ No newline at end of file +Sampled data1020304050−0.00200.002Quadratic Test Function w/ Cubic InterpolantRectilinear GridTruthInterpNSciPyError, InterpNError, SciPy \ No newline at end of file diff --git a/docs/2d_quality_of_fit_Regular.html b/docs/2d_quality_of_fit_Regular.html index e29b03e..dc4a336 100644 --- a/docs/2d_quality_of_fit_Regular.html +++ b/docs/2d_quality_of_fit_Regular.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/2d_quality_of_fit_Regular.svg b/docs/2d_quality_of_fit_Regular.svg index 092f355..e7daff4 100644 --- a/docs/2d_quality_of_fit_Regular.svg +++ b/docs/2d_quality_of_fit_Regular.svg @@ -1 +1 @@ -Sampled data1020304050−500f0500fQuadratic Test Function w/ Cubic InterpolantRegular GridTruthInterpNSciPyError, InterpNError, SciPy \ No newline at end of file +Sampled data1020304050−500f0500fQuadratic Test Function w/ Cubic InterpolantRegular GridTruthInterpNSciPyError, InterpNError, SciPy \ No newline at end of file diff --git a/docs/3d_throughput_vs_nobs.html b/docs/3d_throughput_vs_nobs.html index e1ed9e7..4591fc8 100644 --- a/docs/3d_throughput_vs_nobs.html +++ b/docs/3d_throughput_vs_nobs.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/3d_throughput_vs_nobs.svg b/docs/3d_throughput_vs_nobs.svg index a82f38a..635b133 100644 --- a/docs/3d_throughput_vs_nobs.svg +++ b/docs/3d_throughput_vs_nobs.svg @@ -1 +1 @@ -12510251002510002510k010203012510251002510002510k2468LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x20x20 GridWithout Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file +12510251002510002510k010203012510251002510002510k2468LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x20x20 GridWithout Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file diff --git a/docs/3d_throughput_vs_nobs_prealloc.html b/docs/3d_throughput_vs_nobs_prealloc.html index 66bc7b5..bdc40c5 100644 --- a/docs/3d_throughput_vs_nobs_prealloc.html +++ b/docs/3d_throughput_vs_nobs_prealloc.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/3d_throughput_vs_nobs_prealloc.svg b/docs/3d_throughput_vs_nobs_prealloc.svg index eb09580..44ccec9 100644 --- a/docs/3d_throughput_vs_nobs_prealloc.svg +++ b/docs/3d_throughput_vs_nobs_prealloc.svg @@ -1 +1 @@ -12510251002510002510k020406012510251002510002510k51015LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x20x20 GridWith Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file +12510251002510002510k020406012510251002510002510k51015LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x20x20 GridWith Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file diff --git a/docs/4d_throughput_vs_nobs.html b/docs/4d_throughput_vs_nobs.html index 49d3d0e..d0b9abb 100644 --- a/docs/4d_throughput_vs_nobs.html +++ b/docs/4d_throughput_vs_nobs.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/4d_throughput_vs_nobs.svg b/docs/4d_throughput_vs_nobs.svg index 508019b..4dc5ae1 100644 --- a/docs/4d_throughput_vs_nobs.svg +++ b/docs/4d_throughput_vs_nobs.svg @@ -1 +1 @@ -12510251002510002510k01020304012510251002510002510k2468LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x...x20 4D GridWithout Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file +12510251002510002510k01020304012510251002510002510k2468LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x...x20 4D GridWithout Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file diff --git a/docs/4d_throughput_vs_nobs_prealloc.html b/docs/4d_throughput_vs_nobs_prealloc.html index 8e1ef6f..c2b9bd4 100644 --- a/docs/4d_throughput_vs_nobs_prealloc.html +++ b/docs/4d_throughput_vs_nobs_prealloc.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/4d_throughput_vs_nobs_prealloc.svg b/docs/4d_throughput_vs_nobs_prealloc.svg index f7f9bdc..289c6f8 100644 --- a/docs/4d_throughput_vs_nobs_prealloc.svg +++ b/docs/4d_throughput_vs_nobs_prealloc.svg @@ -1 +1 @@ -12510251002510002510k02040608012510251002510002510k510LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x...x20 4D GridWith Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file +12510251002510002510k02040608012510251002510002510k510LinearScipy RegularGridInterpolator Linear(baseline)InterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearCubicScipy RegularGridInterpolator Cubic(baseline)InterpN MulticubicRegularInterpN MulticubicRectilinearInterpolation on 20x...x20 4D GridWith Preallocated OutputNumber of Observation PointsSpeedup vs. ScipyLinearCubic \ No newline at end of file diff --git a/docs/nearest_quality_of_fit.html b/docs/nearest_quality_of_fit.html index b672dec..66f8460 100644 --- a/docs/nearest_quality_of_fit.html +++ b/docs/nearest_quality_of_fit.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/nearest_quality_of_fit.svg b/docs/nearest_quality_of_fit.svg index 57b0e50..78d2c53 100644 --- a/docs/nearest_quality_of_fit.svg +++ b/docs/nearest_quality_of_fit.svg @@ -1 +1 @@ -Grid samples−1012−101Nearest-Neighbor Quality of Fit — InterpN vs. SciPy griddata (nearest)TruthInterpNSciPyError: InterpNError: SciPySciPy - InterpN \ No newline at end of file +Grid samples−1012−101Nearest-Neighbor Quality of Fit — InterpN vs. SciPy griddata (nearest)TruthInterpNSciPyError: InterpNError: SciPySciPy - InterpN \ No newline at end of file diff --git a/docs/speedup_vs_dims_1000_obs_cubic.html b/docs/speedup_vs_dims_1000_obs_cubic.html index 3b02598..4a15780 100644 --- a/docs/speedup_vs_dims_1000_obs_cubic.html +++ b/docs/speedup_vs_dims_1000_obs_cubic.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/speedup_vs_dims_1000_obs_cubic.svg b/docs/speedup_vs_dims_1000_obs_cubic.svg new file mode 100644 index 0000000..ab32f9e --- /dev/null +++ b/docs/speedup_vs_dims_1000_obs_cubic.svg @@ -0,0 +1 @@ +12345624681012InterpN Speedup vs. ScipyCubic, 1000 Observation PointsNumber of DimensionsSpeedup vs. Scipy \ No newline at end of file diff --git a/docs/speedup_vs_dims_1000_obs_linear.html b/docs/speedup_vs_dims_1000_obs_linear.html index 02a20d3..f75ea5a 100644 --- a/docs/speedup_vs_dims_1000_obs_linear.html +++ b/docs/speedup_vs_dims_1000_obs_linear.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/speedup_vs_dims_1000_obs_linear.svg b/docs/speedup_vs_dims_1000_obs_linear.svg new file mode 100644 index 0000000..131ca0b --- /dev/null +++ b/docs/speedup_vs_dims_1000_obs_linear.svg @@ -0,0 +1 @@ +123456246810InterpN Speedup vs. ScipyLinear, 1000 Observation PointsNumber of DimensionsSpeedup vs. Scipy \ No newline at end of file diff --git a/docs/speedup_vs_dims_1_obs_cubic.html b/docs/speedup_vs_dims_1_obs_cubic.html index 3b79500..91923e2 100644 --- a/docs/speedup_vs_dims_1_obs_cubic.html +++ b/docs/speedup_vs_dims_1_obs_cubic.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/speedup_vs_dims_1_obs_cubic.svg b/docs/speedup_vs_dims_1_obs_cubic.svg new file mode 100644 index 0000000..c79bbf2 --- /dev/null +++ b/docs/speedup_vs_dims_1_obs_cubic.svg @@ -0,0 +1 @@ +12345651015InterpN Speedup vs. ScipyCubic, 1 Observation PointNumber of DimensionsSpeedup vs. Scipy \ No newline at end of file diff --git a/docs/speedup_vs_dims_1_obs_linear.html b/docs/speedup_vs_dims_1_obs_linear.html index bac24fe..9646c79 100644 --- a/docs/speedup_vs_dims_1_obs_linear.html +++ b/docs/speedup_vs_dims_1_obs_linear.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/speedup_vs_dims_1_obs_linear.svg b/docs/speedup_vs_dims_1_obs_linear.svg new file mode 100644 index 0000000..6c69a66 --- /dev/null +++ b/docs/speedup_vs_dims_1_obs_linear.svg @@ -0,0 +1 @@ +123456050100150200InterpN Speedup vs. ScipyLinear, 1 Observation PointNumber of DimensionsSpeedup vs. Scipy \ No newline at end of file diff --git a/docs/throughput_vs_dims_1000_obs.html b/docs/throughput_vs_dims_1000_obs.html index f61a749..ebca626 100644 --- a/docs/throughput_vs_dims_1000_obs.html +++ b/docs/throughput_vs_dims_1000_obs.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/throughput_vs_dims_1000_obs.svg b/docs/throughput_vs_dims_1000_obs.svg index d4722a2..9b602b7 100644 --- a/docs/throughput_vs_dims_1000_obs.svg +++ b/docs/throughput_vs_dims_1000_obs.svg @@ -1 +1 @@ -246250.01250.12512460.0010.010.11LinearScipy RegularGridInterpolator LinearInterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearNumpy InterpCubicScipy RegularGridInterpolator CubicInterpN MulticubicRegularInterpN MulticubicRectilinearScipy RectBivariateSpline CubicInterpolation on 4x...x4 N-Dimensional Grid1000 Observation PointsNumber of DimensionsNormalized ThroughputLinearCubic \ No newline at end of file +246250.01250.12512460.0010.010.11LinearScipy RegularGridInterpolator LinearInterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearNumpy InterpCubicScipy RegularGridInterpolator CubicInterpN MulticubicRegularInterpN MulticubicRectilinearScipy RectBivariateSpline CubicInterpolation on 4x...x4 N-Dimensional Grid1000 Observation PointsNumber of DimensionsNormalized ThroughputLinearCubic \ No newline at end of file diff --git a/docs/throughput_vs_dims_1_obs.html b/docs/throughput_vs_dims_1_obs.html index 0a29859..1ccb288 100644 --- a/docs/throughput_vs_dims_1_obs.html +++ b/docs/throughput_vs_dims_1_obs.html @@ -1,2 +1,2 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/throughput_vs_dims_1_obs.svg b/docs/throughput_vs_dims_1_obs.svg index b8c7afb..19bacdb 100644 --- a/docs/throughput_vs_dims_1_obs.svg +++ b/docs/throughput_vs_dims_1_obs.svg @@ -1 +1 @@ -2460.001250.01250.125122460.01250.1251LinearScipy RegularGridInterpolator LinearInterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearNumpy InterpCubicScipy RegularGridInterpolator CubicInterpN MulticubicRegularInterpN MulticubicRectilinearScipy RectBivariateSpline CubicInterpolation on 4x...x4 N-Dimensional Grid1 Observation PointNumber of DimensionsNormalized ThroughputLinearCubic \ No newline at end of file +246250.01250.125122460.01250.1251LinearScipy RegularGridInterpolator LinearInterpN MultilinearRegularInterpN MultilinearRectilinearInterpN NearestRegularInterpN NearestRectilinearNumpy InterpCubicScipy RegularGridInterpolator CubicInterpN MulticubicRegularInterpN MulticubicRectilinearScipy RectBivariateSpline CubicInterpolation on 4x...x4 N-Dimensional Grid1 Observation PointNumber of DimensionsNormalized ThroughputLinearCubic \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7137e26..8aff54b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "interpn" -version = "0.8.1" +version = "0.8.2" description = "N-dimensional interpolation/extrapolation methods" authors = [{ name = "James Logan", email = "jlogan03@gmail.com" }] readme = "README.md" diff --git a/uv.lock b/uv.lock index 66bb470..0eb09b6 100644 --- a/uv.lock +++ b/uv.lock @@ -292,7 +292,7 @@ wheels = [ [[package]] name = "interpn" -version = "0.8.1" +version = "0.8.2" source = { editable = "." } dependencies = [ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },