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

  • Home
  • SEARCH
  • 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 255901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:58:09+00:00 2026-05-11T21:58:09+00:00

I like to use python for almost everything and always had clear in my

  • 0

I like to use python for almost everything and always had clear in my mind that if for some reason I was to find a bottleneck in my python code(due to python’s limitations), I could always use a C script integrated to my code.

But, as I started to read a guide on how to integrate python. In the article the author says:

There are several reasons why one might wish to extend Python in C or C++, such as:

  • Calling functions in an existing library.
  • Adding a new builtin type to Python
  • Optimising inner loops in code
  • Exposing a C++ class library to Python
  • Embedding Python inside a C/C++ application

Nothing about performance. So I ask again, is it reasonable to integrate python with c for performance?

  • 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-05-11T21:58:09+00:00Added an answer on May 11, 2026 at 9:58 pm

    In my experience it is rarely necessary to optimize using C. I prefer to identify bottlenecks and improve algorithms in those areas completely in Python. Using hash tables, caching, and generally re-organizing your data structures to suit future needs has amazing potential for speeding up your program. As your program develops you’ll get a better sense of what kind of material can be precalculated, so don’t be afraid to go back and redo your storage and algorithms. Additionally, look for chances to kill “two birds with one stone”, such as sorting objects as you render them instead of doing huge sorts.

    When everything is worked to the best of your knowledge, I’d consider using an optimizer like Psyco. I’ve experienced literally 10x performance improvements just by using Psyco and adding one line to my program.

    If all else fails, use C in the proper places and you’ll get what you want.

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

Sidebar

Ask A Question

Stats

  • Questions 132k
  • Answers 132k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer For a general understanding of linkers, read the book “Linkers… May 12, 2026 at 6:22 am
  • Editorial Team
    Editorial Team added an answer The Iterator pattern is generally considered a proper method to… May 12, 2026 at 6:22 am
  • Editorial Team
    Editorial Team added an answer In terms of organization, looking at the POSIX APIs, especially… May 12, 2026 at 6:22 am

Related Questions

I've pretty much tried every Python web framework that exists, and it took me
I've been doing a project at work recently focused on an almost entirely client-driven
Does anyone use tuples in Ruby? If so, how may one implement a tuple?
I am using Python to read in data in a user-unfriendly format and transform

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.