Skip to content

pyjulia slower than expected for some operations #415

@mjohnson541

Description

@mjohnson541

I've been using pyjulia to wrap a julia package, but the wrapper seems slower than I would expect. The pyjulia code using diffeqpy involves some setup to generate the react object which has a julia ODEProblem with a julia function attached, but the main operation is a solve like this:

sol = de.solve(react.ode,de.CVODE_BDF(),abstol=1e-16,reltol=1e-6)

In pure julia at first evaluation this takes about 20 seconds, and after that it takes about 6 seconds
In pyjulia at first evaluation this takes about 30 seconds and after that it takes about 18 seconds.

I get the same result if I interface directly with DifferentialEquations without diffeqpy.

I can't think of any reason it should be that different. Does some of the jit compilation have to happen every evaluation in pyjulia? I'm using the python-jl fix if that affects things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions