Python Forum

Full Version: Can Python make a large program with lots of gigabytes?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm wondering if it's possible if not suggest me a programming language powerful yet as easy as Python.
Python can easily use memory in the gigabytes. It can use whatever hardware is available.
(Dec-17-2016, 08:22 AM)micseydel Wrote: [ -> ]Python can easily use memory in the gigabytes. It can use whatever hardware is available.

So does that mean it won't be slower if it makes a program with lots of Gigabytes?
The aim of a good programmer is to get the task done as efficiently as possible. Writing a program with
lot's of gigabytes is not a goal that you want to aim for. It will of course function in that environment, and
speed is not a function of how a large a program is as the it can only run as fast as the CPU will allow (very fast)
regardless of program size.
(Dec-17-2016, 11:17 AM)Larz60+ Wrote: [ -> ]The aim of a good programmer is to get the task done as efficiently as possible. Writing a program with
lot's of gigabytes is not a goal that you want to aim for. It will of course function in that environment, and
speed is not a function of how a large a program is as the it can only run as fast as the CPU will allow (very fast)
regardless of program size.

Short answer?Can Python make a large program with lots of gigabytes?That's the question.
Yes it can
Quote:Can Python make a large program with lots of gigabytes?That's the question.
Done Wink 
It's now 2,4 GB,a couple of more 0 in size and it will fill up all your gigabytes.
char = "abcdefghijklmnopqrstuvwxyz"
tmp = char[::-1]
result = char + tmp[1:]
size = 50000000

with open('my.dat', 'w') as f:
    for i in range(size):
        f.write(result)
You need to more specific in your question,
of course Python can make and run large programs.
These use Python for large part of infrastructure(Youtube,Spotify,DropBox...ect).
Python scientific stack is used with big data,
there they can have data-set in Petabyte size.
(Dec-17-2016, 08:24 AM)OnisionTheOninonBoy Wrote: [ -> ]So does that mean it won't be slower if it makes a program with lots of Gigabytes?
Python does not differ from other languages, such as C, in its behavior. If you need more memory than the computer has, your program will slow down (or crash). Processing 2 gigabytes of data will typically take about twice as long as processing 1 gigabyte of data, assuming there's enough memory in each case.
(Dec-17-2016, 03:56 PM)snippsat Wrote: [ -> ]
Quote:Can Python make a large program with lots of gigabytes?That's the question.
Done Wink 
It's now 2,4 GB,a couple of more 0 in size and it will fill up all your gigabytes.
char = "abcdefghijklmnopqrstuvwxyz"
tmp = char[::-1]
result = char + tmp[1:]
size = 50000000

with open('my.dat', 'w') as f:
    for i in range(size):
        f.write(result)
You need to more specific in your question,
of course Python can make and run large programs.
These use Python for large part of infrastructure(Youtube,Spotify,DropBox...ect).
Python scientific stack is used with big data,
there they can have data-set in Petabyte size.
Is it possible to make a game like metal gear rising with Python then?
It is possible, although with much extra effort I believe, since that is not Python's purpose. Same way one can build a website using C only, but it will be a big pain.
Pages: 1 2