Skip to content

Conversation

@seanlaw
Copy link
Contributor

@seanlaw seanlaw commented Feb 27, 2025

Tested the njit dot function from numpy:

import numpy as np
from numba import njit


def setup(Q, T):
    sliding_dot_product(Q, T)
    return


@njit(fastmath=True)
def sliding_dot_product(Q, T):
    m = Q.shape[0]
    l = T.shape[0] - m + 1
    out = np.empty(l)
    for i in range(l):
        out[i] = np.dot(Q, T[i : i + m])

    return out

Using ./test.py -noheader -pmin 6 -pmax 23 -pdiff 6 challenger >> timing.csv.

download-29

@seanlaw seanlaw changed the title CHALLENGER njit numpy dot CHALLENGER njit serial numpy dot Feb 27, 2025
@seanlaw
Copy link
Contributor Author

seanlaw commented Feb 27, 2025

The results are comparable to the original njit and, possibly, "better" when len(Q) == len(T) and len(T) <= 2^14.

I would consider comparing the lower p values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant