serge-sans-paille
pythran
BlogDocsChangelog

[WIP] Support passing package name as pythran signature

#2371
Comparing
bug/2367
(
060e174
) with
master
(
b00edbe
)
CodSpeed Performance Gauge
0%
Untouched
58

Benchmarks

Passed

test_cronbach
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
+2%
12.8 ms12.6 ms
test_fft
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
+1%
60.6 ms60.1 ms
test_repeating
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
2.3 ms2.3 ms
test_sobelfilter
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
37.1 ms37 ms
test_laplace
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
14.4 ms14.4 ms
test_fbcorr
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
58.9 ms58.9 ms
test_approximated_callgraph
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
5.5 ms5.5 ms
test_sumarray3d
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
test_mandel
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
15 ms15 ms
test_histogram
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
1.8 s1.8 s
test_another_quicksort
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
216.5 ms216.4 ms
test_smoothing
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
12.2 ms12.2 ms
test_fdtd
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
7 ms7 ms
test_allpairs_distances_loops
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
28.6 ms28.6 ms
test_hyantes_core
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
136.4 ms136.4 ms
test_allpairs_distances
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
42.6 ms42.6 ms
test_morphology
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
11.9 ms11.9 ms
test_grouping
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
test_growcut
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
15.2 ms15.2 ms
test_emin
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
6.8 ms6.8 ms
test_pairwise
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
30.6 ms30.6 ms
test_kmeans
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
53 ms53 ms
test_wave_simulation
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
28.6 ms28.6 ms
test_pi_buffon
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
16 ms16 ms
test_guerre
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
80.4 ms80.4 ms
test_sexy_primes
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
49.2 ms49.2 ms
test_periodic_dist
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
2.8 s2.8 s
test_slowparts
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
704 ms704 ms
test_arc_distance
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
1 s1 s
test_l2norm
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
642.8 ms642.8 ms
test_cdotc
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
4.8 s4.8 s
test_rosen
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
488 ms488 ms
test_cdotu
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
4.8 s4.8 s
test_harris
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
1.9 s1.9 s
test_zero
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
1.3 s1.3 s
test_euler_challenge14
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
589.5 ms589.5 ms
test_d2q9_nxnyns
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
76 ms76 ms
test_vibr_energy
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
44.8 ms44.8 ms
test_sum_primes
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
32.8 ms32.8 ms
test_primes_sieve2
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
270.2 ms270.2 ms
test_monte_carlo
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
59.1 ms59.1 ms
test_reverse_cumsum
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
9.7 ms9.7 ms
test_nqueens
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
747.3 ms747.4 ms
test_primes_sieve
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
221.8 ms221.8 ms
test_create_grid
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
50.8 ms50.8 ms
test_pairwise_numpy
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
2.9 ms2.9 ms
test_allpairs
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
76.2 ms76.2 ms
test_extrema
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
305.8 ms305.8 ms
test_blacksholes
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
583.1 ms583.2 ms
test_brownian
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
123.1 ms123.1 ms
test_bubble_sort
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
26.9 ms26.9 ms
test_deuxd_convolution
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
4.7 ms4.7 ms
test_arc_distance_list
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
329.3 ms329.4 ms
test_calculate_u
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
19.8 ms19.8 ms
test_diffusion_pure_python
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
2.3 ms2.3 ms
test_fibo
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
3.5 ms3.5 ms
test_stone
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
288.2 µs288.7 µs
test_specialconvolve
pythran/benchmarks/test_benchmark.py
CodSpeed Performance Gauge
0%
15.8 ms15.9 ms

Commits

Click on a commit to change the comparison range
Base
master
b00edbe
+0.06%
Support passing package name as pythran signature This patch introduces a new argument type of the form `<name> pkg`, for instance `numpy pkg`. It's a special function export type which, if used, must be used consistently across all overloads for that exported function. To support that change, a new pre-processing step has been added. It performs package inference, and tries hard to statically resolve a package name based on the lookup made on it. If a single package matches the constraints, that package is picked. Otherwise nothing is done. The pythran signature just adds an extra constraint. For instance, #pythran export foo(float, numpy pkg) def foo(x, np): return np.cos(x) is equivalent to the following: #pythran export foo(float, numpy pkg) def foo(x, _): import numpy as np return np.cos(x) The exported foo function still has two parameters and the second parameter is going to check that the passed argument is a module named 'numpy'. Fix #2367
060e174
1 month ago
by serge-sans-paille
© 2025 CodSpeed Technology
Home Terms Privacy Docs