473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Performance of Python Programming

440 256MB
Hi,

Since in other languages we have pointer concept and we allocate memory and deallocate memory for various variables .So there will not be much memory consumption.But in case of Python we dont have memory allocation concept to variables,then what will be the memory consumption and performance of the applications developed.


Thanks in advance
PSB
Mar 3 '07 #1
4 1073
bartonc
6,596 Expert 4TB
Hi,

Since in other languages we have pointer concept and we allocate memory and deallocate memory for various variables .So there will not be much memory consumption.But in case of Python we dont have memory allocation concept to variables,then what will be the memory consumption and performance of the applications developed.


Thanks in advance
PSB
High level languages such as Java and Python use a thing called garbage collecting (gc). What the engine does is count the number of references to a variable. When that count reaches zero, the varable is marked for gc. Every so often the engine goes through and frees memory use by variable that no are longer being used.
You can use
Expand|Select|Wrap|Line Numbers
  1. del anyVariable
to free memory imediately (often used for large variables that are no longer needed).
Mar 3 '07 #2
ghostdog74
511 Expert 256MB
You can use
Expand|Select|Wrap|Line Numbers
  1. del anyVariable
to free memory imediately...
actually del just removes the name from the namespace. see here . The memory is not reclaimed until later. ( not sure for latest version of Python though)
Mar 3 '07 #3
bartonc
6,596 Expert 4TB
actually del just removes the name from the namespace. see here . The memory is not reclaimed until later. ( not sure for latest version of Python though)
Thanks for the correction. Glad to see that you have become a very active and (always) valuable part of this community. Thanks for all your input.
Mar 3 '07 #4
ghostdog74
511 Expert 256MB
Thanks for the correction. Glad to see that you have become a very active and (always) valuable part of this community. Thanks for all your input.
No prob. glad to be part of the community too
Mar 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr...
38
by: kbass | last post by:
In different articles that I have read, persons have constantly eluded to the productivity gains of Python. One person stated that Python's productivity gain was 5 to 10 times over Java in some in...
0
by: Saravanan D | last post by:
Hello, I tried the examples in " Python Programming on Win32" book related to Python Services & Performance Counters. But in my PerfMon, performance objects are not listed. Could any one...
52
by: Neuruss | last post by:
It seems there are quite a few projects aimed to improve Python's speed and, therefore, eliminate its main limitation for mainstream acceptance. I just wonder what do you all think? Will Python...
5
by: sandy | last post by:
Hi All, I am a newbie to MySQL and Python. At the first place, I would like to know what are the general performance issues (if any) of using MySQL with Python. By performance, I wanted to...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
8
by: Thomas Junior | last post by:
I always assumed C++ would have better performance than C and, when I had the choice, opted for C++. Today, however, I was researching writing components for Linux and came across this...
133
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
35
by: John Coleman | last post by:
Greetings, I have a rough classification of languages into 2 classes: Zen languages and tool languages. A tool language is a language that is, well, a *tool* for programming a computer. C is the...
4
by: sandipm | last post by:
I did fair amount of programming in python but never used c/c++ as mentioned below. any good tutorials for using C/C++ to optimize python codebase for performance? how widely do they use such...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.