Skip to content

Benchmarking Numba vs JAX #1266

@tomwhite

Description

@tomwhite

We have used Numba to accelerate CPU computations in sgkit for a long time - and to great effect. We have previously discussed trying JAX as an alternative to see how it compares.

I created a notebook to compare basic allele counting (count_call_alleles) using Numba with a JAX equivalent here: https://github.com/tomwhite/sgkit/blob/134f15c18558458f6b04607cca9915e5ca90acf6/benchmark-numba-vs-jax.ipynb

The JAX code I wrote is significantly slower than Numba in this case. It could be because I've used JAX's bincount function, rather than writing code that operates directly on the arrays - like Numba does - but I'm not sure how to do that with JAX.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions