--- Final Solver (used for performance test) ---
import numpy as np
from typing import Any
import numba

@numba.njit(fastmath=True)
def _fast_outer(v1, v2, out):
    n = len(v1)
    for i in range(n):
        for j in range(n):
            out[i, j] = v1[i] * v2[j]
    return out

class Solver:
    def __init__(self):
        # Warmup for common type combinations
        types = [np.float64, np.float32, np.int64]
        for t1 in types:
            for t2 in types:
                try:
                    v1 = np.ones(2, dtype=t1)
                    v2 = np.ones(2, dtype=t2)
                    out = np.empty((2, 2), dtype=np.result_type(v1, v2))
                    _fast_outer(v1, v2, out)
                except Exception:
                    pass

    def solve(self, problem: tuple[np.ndarray, np.ndarray], **kwargs) -> Any:
        v1, v2 = problem
        # Ravel just in case the input has shape (N, 1) or (1, N)
        v1 = v1.ravel()
        v2 = v2.ravel()
        out = np.empty((len(v1), len(v2)), dtype=np.result_type(v1, v2))
        return _fast_outer(v1, v2, out)
--- End Solver ---
Running performance test...
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.0.2, pluggy-1.6.0
rootdir: /tests
plugins: anyio-4.13.0, jaxtyping-0.3.9
collected 3 items

../tests/test_outputs.py .
--- Performance Summary ---
Validity: True
Total Baseline Time: 6.4791s
Total Solver Time:   6.8581s
Raw Speedup:         0.9447 x
Final Reward (Score): 1.0000
---------------------------
.F

=================================== FAILURES ===================================
_____________________________ test_solver_speedup ______________________________

performance_results = {'raw_speedup': 0.9447365816067691, 'speedup': 1.0, 'validity': True}

    def test_solver_speedup(performance_results):
        """Checks if the solver effectively optimized the code."""
>       assert performance_results["raw_speedup"] > 1.0, \
            f"Solver was not faster than baseline (Speedup: {performance_results['raw_speedup']:.2f}x)"
E       AssertionError: Solver was not faster than baseline (Speedup: 0.94x)
E       assert 0.9447365816067691 > 1.0

/tests/test_outputs.py:205: AssertionError
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_outputs.py::test_solver_exists
PASSED ../tests/test_outputs.py::test_solver_validity
FAILED ../tests/test_outputs.py::test_solver_speedup - AssertionError: Solver...
=================== 1 failed, 2 passed in 219.11s (0:03:39) ====================
