title: Why does hypothesis consider this code slow?
body: <p>Hypothesis complains vehemently that this was slow:</p>
  <pre class="lang-py prettyprint-override"><code>@composite
  def f_and_g_and_padding(draw, in_channels = channel_ints, out_channels = channel_ints, fs = shapes_2d, fill=None, elements=well_behaved_floats):
      shape_f = draw(basic_shape)
      padding = draw(shapes_2d)
      fs = draw(fs)
      in_channels = draw(in_channels)
      out_channels = draw(out_channels)
      batch_size = draw(shape_ints)
      shape_f = (batch_size, in_channels, fs[0], fs[1])
      f = draw(stnp.arrays(dt_numpy, shape_f, elements=elements, fill=fill))
      h_in = f.shape[2] + padding[0] * 2
      w_in = f.shape[3] + padding[1] * 2
      shape_g = (out_channels, in_channels, h_in, w_in)
      g = draw(stnp.arrays(dt_numpy, shape_g, elements=elements, fill=fill))
      
      return (f, g, padding)
  </code></pre>
  <p>I have tried to find out why, but failed. See: <a href="https://stackoverflow.com/questions/69569930/how-to-use-pytest-hypothesis-and-line-profiler-kernprof-together">How to use pytest, hypothesis and line_profiler / kernprof together?</a>.</p>
  <p>So, my question remains: <strong>Why?</strong></p>
  <p>Here are the other strategies used:</p>
  <pre class="lang-py prettyprint-override"><code>well_behaved_floats = stnp.from_dtype(dtype=dt_numpy, allow_infinity=False, allow_nan=False)
  small_floats = stnp.from_dtype(dtype=dt_numpy, min_value=-10000, max_value=10000, allow_infinity=False, allow_nan=False)
  floats_0_1 = stnp.from_dtype(dtype=dt_numpy, min_value=-1, max_value=1, allow_infinity=False, allow_nan=False)
  small_ints = stnp.from_dtype(dtype=numpy.dtype(&quot;i4&quot;), allow_infinity=False, allow_nan=False, min_value=-10, max_value=10)
  small_positive_ints = stnp.from_dtype(dtype=numpy.dtype(&quot;i4&quot;), allow_infinity=False, allow_nan=False, min_value=0, max_value=10)
  one_or_greater = st.integers(min_value=1)
  shape_ints = st.integers(min_value=1, max_value=4)
  channel_ints = st.integers(min_value=1, max_value=10)
  basic_shape = stnp.array_shapes(min_dims=4, max_dims=4, min_side=1, max_side=10)
  ones = st.integers(min_value=1, max_value=1)
  
  shapes_2d = stnp.array_shapes(min_dims=2, max_dims=2, min_side=1, max_side=4)
  </code></pre>
  <p>Used like this:</p>
  <pre class="lang-py prettyprint-override"><code>@given(f_and_g_and_padding(elements=ones))
  def test_padding(f_g_padding: Tuple[numpy.ndarray, numpy.ndarray, Tuple[int, int]]):
      f, g, padding = f_g_padding
      run_test(Tensor(f), Tensor(g), padding=padding)
  </code></pre>
  <p>There's no filtering, just plain simple drawing and numpy arrays.</p>
  <p>fwiw here's the hypothesis config:</p>
  <pre class="lang-py prettyprint-override"><code>hypothesis.settings.register_profile(&quot;default&quot;,
                                       derandomize=True,
                                       deadline=None,
                                       print_blob=True,
                                       report_multiple_bugs=False,
                                       suppress_health_check=[HealthCheck.too_slow])
  </code></pre>