Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7886077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:13:51+00:00 2026-06-03T05:13:51+00:00

I have a program in python using numpy and scipy. adding cython in it

  • 0

I have a program in python using numpy and scipy.
adding cython in it will be a time taking process as there are many changes in data types

The cprofile of it looks like this:
https://i.stack.imgur.com/O2J9O.jpg

Most of the time (73% ) is used up by <scipy.integrate_odepack.odeint>
My question basically is, does using cython speed up this function(maybe by faster calling) and the rest.
This function is called ~10^6 times in this example.
And if so, How much speed up can I expect?
I consider pursuing this if speed up is atleast 4x to 5x

note:

If the information provided is insufficient, please comment below and I’d be glad to provide

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:13:53+00:00Added an answer on June 3, 2026 at 5:13 am

    Well half of the time of <scipy.integrate_odepack.odeint> is being spent inside dx_dv and dx_du these look like they’re python functions. These are functions you could target especially if they are complex.

    One thing to bear in mind is that if the slow down is just because of the calling overhead * number of calls then I wouldn’t expect things to improve much. That overhead won’t disappear, in fact it might be made more complex. Instead of SciPy C -> Python, you’ll be doing SciPy C -> Python -> your C.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using cython for a correlation calculation in my python program. I have two
I have been asked to write a program using python for an assignment. I
I have the following Python 2.6 program and YAML definition (using PyYAML ): import
I want to have simple program in python that can process different requests (POST,
I have a Python program that processes fairly large NumPy arrays (in the hundreds
I have a program to send mail using python smtplib. I have the mail
I am trying to write a python program using Python 3 I have to
I am working on a program using python, HTML and javascript. I have two
I usually script/program using python but have recently begun programming with JavaScript and have
I have a class that handles command line arguments in my program using python's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.