pyhf
                                
                                 pyhf copied to clipboard
                                
                                    pyhf copied to clipboard
                            
                            
                            
                        vectorize pvalue calculations
Description
once #1162 is in, there is a slight performance bottleneck in terms of this loop
https://github.com/scikit-hep/pyhf/pull/1162/files#diff-ed4ae97f40d769c90d21f07e7ab70f34a875fe5374d8dc9bdd35983ce1910640R602
that can easily be vectorized b/c np.percentile is vectorizable. But I didn't find the time to do this. It's only notiacable w/ jax because the numpy conversion are expensive
Additional context
Add any other context or screenshots about the feature request here.
@lukasheinrich PR #1694 will use tensorlib.percentile over np.percentile to avoid the conversion. What loop in particular were you referring to? The