Processing power is growing - but RAM size grows much faster than CPU single-threaded performance.
At the same time CPU speed is increasing much faster than RAM throughput so cache friendly code and data structures are more important than ever.
Processing power is growing - but RAM size grows much faster than CPU single-threaded performance.
There is no such thing as "inherent nature of GC". Different VMs and languages have different garbage collector implementations with drastically different performance characteristics, settings, runtime controls and so on. Moreover, it is an active area of research and performance in most languages changes over time.Unity killed many ambitious games (like Hellion) - not because less than optimal framerate - but because of this inherent nature of GC - and random pauses every few minutes.
I give up. I swear I tried, but you're so entrenched in this cringy "trolololol" persona that it's impossible to have a reasonable conversation with you.You just keep getting more and more upset, just like in the Elden Ring thread, or the Shitmaker thread before that. Like this other guy:![]()
Just please take a step back and realize that I came here saying "I love Python" and your immediate reaction was "you're still butthurt, you're obsessed with me, cry some more". I don't know what being always so on the defensive means, but seeing you act like this every single time is kinda sad.
I love Python and how easy it is to do stuff with it even for inexperienced people, but my last experience with it went something like:
"Boohoo, our beautiful program is perfect but it runs for hours what can we do"
"Here, I rewrote everything in C++"
"NO WHAT ARE YOU DOING THIS IS HORRIBLE... wait, why does it run for just a couple of seconds now?"
Granted, it was a very fringe case of a custom, complex algorithm to solve unreasonably large linear problems and one can't draw general conclusions from it, but it's still painful to have to deal with self-made programmers who think Python is literally our lord and savior.
Nowadays - I would say that even predictable 500% overhead would be perfectly acceptable - but if GC needs to defragment allocations of old generation objects - it will stop all threads of application for as long as it needs. If you give it more memory - you sometimes get exponentially longer pauses - just less often.
What you wrote regarding stop-the-world GCs is certainly true, and that's representative of how the GC in the JVM works.And 'professional software' is not that much different. I've seen deployments where GC was disabled and instances were restarted one by one after midnight to free memory - because it was more predictable than letting GC do its job.
Nim's GC is also thread local, so each thread has an independent garbage collection. This means one thread's collection doesn't halt all other threads as with the Boehm GCs (which you can select from Nim if you want this). Additionally it means you can create threads in Nim that do not use GC types and thus do not use GC at all. "Stop the world" collection aka halting all threads to collect garbage is a problem in many other GC languages due to sharing the GC across threads, and really hits performance for example with multithreading in Python with it's GIL.
In real terms, Nim's GC is almost never the problem with performance. If you want to see what the GC is up to, you can use GC_getStatistics. You will see zero time is being spent even if you're hammering it, which is hard to do. In my largest project, which is performance sensitive, I get about 2,000 scans every 5 seconds. That's nothing. Much bigger impact is from actual work that needs doing and how cache friendly something is, which is down to program design.
You can also use GC_Strategy to declare if you want throughput, memory usage or responsiveness for example. You can use the realtime GC and force it's collection period within milliseconds, you can even tell the GC where roots are, what structures are acyclic with the {.acyclic.} pragma (useful for some types of trees) and even step the GC manually or force collections when you want.
That's a level-headed post of yours, and if you started out with something like this, I think there would have been a lot less drama. Personally, I still don't like the forced imperative model, mutation everywhere, and lack of basic functional features in Python, but just to get the job done in scripts and automation Python is fine, can't disagree with that. I would also be the first to admit that imperative programming is a lot simpler to pick up for people who only sporadically write a few scripts but aren't full-blown coders (e.g. many scientists, data analysts, etc). And I like the syntax in general, and one of my favourite languages, Nim, is heavily inspired by the Python syntax.The stuff above might not apply to everything, I wouldn't use Python for truly fast code, e.g. 3D games or operating systems or those financial programs that need to submit transactions in fractions of a second or a website that serves tens of millions of hits daily, but for the vast majority of real world applications, Python speed is not a big issue.
That's a level-headed post of yours, and if you started out with something like this, I think there would have been a lot less drama. Personally, I still don't like the forced imperative model, mutation everywhere, and lack of basic functional features in Python, but just to get the job done in scripts and automation Python is fine, can't disagree with that. I would also be the first to admit that imperative programming is a lot simpler to pick up for people who only sporadically write a few scripts but aren't full-blown coders (e.g. many scientists, data analysts, etc). And I like the syntax in general, and one of my favourite languages, Nim, is heavily inspired by the Python syntax.The stuff above might not apply to everything, I wouldn't use Python for truly fast code, e.g. 3D games or operating systems or those financial programs that need to submit transactions in fractions of a second or a website that serves tens of millions of hits daily, but for the vast majority of real world applications, Python speed is not a big issue.
I think the problems started when you went into retardo territory and started claiming that strongly typed languages are *only* for idiots and cheap outsourced teams...
Anyway, I'm willing to put that behind us![]()
you were just too butthurt to notice because you started raging when I criticized your preferred languages
Python is fine for websites and any kind of programs really, short of a realtively small niche of high performance applications.
And I never said strongly typed languages were for idiots, I said they were more idiot-proof and thus a better fit for larger teams with varying quality of developers. Do you really not see the difference in what I am saying and what you are saying?
you were just too butthurt to notice because you started raging when I criticized your preferred languages
You're talking about yourself here now, right?
Python is fine for websites and any kind of programs really, short of a realtively small niche of high performance applications.
For example like all mobile apps and all embedded devices? Hello? Or anywhere where you need to ship a *binary*, not just some unencrypted, free-to-read-for-the-whole-world script and a 40-50 megs runtime for your 1k script? The world is not just automation scripts and websites...
And I never said strongly typed languages were for idiots, I said they were more idiot-proof and thus a better fit for larger teams with varying quality of developers. Do you really not see the difference in what I am saying and what you are saying?
Giving it right back at ya: "And you are still twisting my words"(And conveniently ignoring or side-stepping facts we have presented when it doesn't align with or undermine your "agenda"...)
Anyway, a lot of knowledgeable people have shared their views on the merits of various programming languages and paradigms in this thread; the information is there if you're willing to step outside of *your* niche of Python development. Have a nice day, fella.
I am just here to defend a great language against silly people like you
I am just here to defend a great language against silly people like you
No, you are here to defend Python against Guido van Rossum, whom you called a Python hater.
Modern GCs change the way VM deals with new generation of objects - those that survive shorter than few seconds without deep web of interdependencies or are accessed from single thread.There is no such thing as "inherent nature of GC". Different VMs and languages have different garbage collector implementations with drastically different performance characteristics, settings, runtime controls and so on. Moreover, it is an active area of research and performance in most languages changes over time.Unity killed many ambitious games (like Hellion) - not because less than optimal framerate - but because of this inherent nature of GC - and random pauses every few minutes.
(...)
In short, making overly generic statements about GC is paramount to lying.
Mono 5 introduced incremental GC as a feature preview at the end of 2018. Hellion was released for early access in 2017. What GC was Hellion using?
Unity killed many ambitious games (like Hellion) - not because less than optimal framerate - but because of this inherent nature of GC - and random pauses every few minutes.
GC is a "solution" to a problem that doesn't really exist. If you get memory management problems in non-gc languages you simply suck as a programmer. It's simple. GC was designed for modern languages and "modern" programmers and I don't want to point out who they are. We all know.In short, making overly generic statements about GC is paramount to lying.
This has been proven wrong so many times I don't know why people keep repeating this lie. You are talking to actual programmers here, no need to convince anyone. You can make programs slow really fast if you don't know what you are doing. Python is slow, no one has proven anything else yet. Show us the fucking programs written in Python that run fast, or shut the fuck up.2. Modern hardware is extremely powerful, with CPUs being able to do something on the order of billions of operations per second. Meaning a benchmark test that shows that C++ is 40 times as fast as Python is meaningless in most real world applications
I believe it was GC stopping the world every few seconds once new player got connected. Since the QuakeWorld every reasonable programmer knows that if you don't get new packet from the client - client is moving in the same direction with the same speed. On the other hand - there are plenty of crazy new game companies who think that experienced programmers will accept 2000$ a month ...I would really be interested how this multiplayer bug came about when position of objects was not in sync and ships suddenly jumped several hundred meters, sometimes causing collisions. Was that related to a lack of understanding of floating point variables? or an attempt to "optimize" that caused the most bizarre of bugs? in any event it was this that mostly killed the game because the idea of precision space docking was sabotaged by ships jumping around you like monkeys on a stickUnity killed many ambitious games (like Hellion) - not because less than optimal framerate - but because of this inherent nature of GC - and random pauses every few minutes.
Python performance issues are completely overblown here. It is a relatively slow language compared to others, but what these people won't tell you (for you young programmers out there):
1. For many real world applications, performance doesn't matter that much. For example, any kind of scripts, automation, tools, scientific programs, etc generally are not real-time, meaning if they have to run for some time, it's not a big deal. If you are running an automated script for some office process for example, it doesn't matter if it runs for 3 minutes or 15 minutes in most cases, because it will be running in the background.
2. Modern hardware is extremely powerful, with CPUs being able to do something on the order of billions of operations per second. Meaning a benchmark test that shows that C++ is 40 times as fast as Python is meaningless in most real world applications, because a C++ program will finish in let's say 0.01 seconds, and a Python program finishing 40 times later, will finish in 0.4 seconds. Do you think anyone will notice the difference in the real world?
Agree about the "badly written code" part.3. Most real world slowness in programs comes not from the programming language but from other sources: IO, DB connections, Internet, or badly written code. These things will generally dwarf whatever performance differences there are between languages.
I think you're downplaying it. IMO, Python is unsufferably slow and you have lots of high level languages that are more expressive AND much faster.The stuff above might not apply to everything, I wouldn't use Python for truly fast code, e.g. 3D games or operating systems or those financial programs that need to submit transactions in fractions of a second or a website that serves tens of millions of hits daily, but for the vast majority of real world applications, Python speed is not a big issue.
No GC is very old and was in McCarthy's Lisp.GC is a "solution" to a problem that doesn't really exist. If you get memory management problems in non-gc languages you simply suck as a programmer. It's simple. GC was designed for modern languages and "modern" programmers and I don't want to point out who they are. We all know.In short, making overly generic statements about GC is paramount to lying.
Since the QuakeWorld every reasonable programmer knows that if you don't get new packet from the client - client is moving in the same direction with the same speed.
No GC is very old and was in McCarthy's Lisp.
GC has its uses in high level languages, it enables very convenient abstractions, we just don't want it in realtime programming (yet ?) nor systems programming (ever ?).
The stuff above might not apply to everything, I wouldn't use Python for truly fast code, e.g. 3D games or operating systems or those financial programs that need to submit transactions in fractions of a second or a website that serves tens of millions of hits daily, but for the vast majority of real world applications, Python speed is not a big issue.
But you can create a game with any language. Graphical games? It depends if the language has any graphics library, but if it's a text-based, yes, you can do it with any language.From my perspective it's games. If you can't create a game with some language it's pretty useless. Why would I use it then, to do what?It's mostly a few utilities that modders have written for various games.