Python Forum

Full Version: Why the python is so slow?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1.07^600 somehow 4.268414741×10¹⁷ then 1.07 ^ 120 is 3357.78838289 times, so why the socium telling that asm to c is 1.07 and c to python is 1 to 600 and how to make things work without actual strict code convertion precision even in best notificated sociale criterium ~3357 times is a lot of wasted energy for society.
i mean move a stuck of a symbol in processor can be 400 000 000 000 symbols per second for MOV function, and the database in 24mb is moving for ~1 second in python strict characters nor image convertad and cryptographed symbols, so 4ghz should move in speed 4b per second so 24305568 in 1 processing second (4000000000000 symbols) 164571 times then it should be moved in ~0.006 of ms but was moved 782 ms so 130333 times more not accurate, so why!?
4.268414741×10¹⁷ and 3357 is the socium precisions and the actual first-repeatable-try (because actual first was around 5-6 seconds and the several next with gc turned off 1 second surplus) not the same as 130333 times slowler, then 1.07 ^ 140 more precise to the flow.

So the conclusion of this idiotic demagogy, is python really 140th accent language over processor's asm dialect?


*24124184.469348352+((30.1+151.6)×998.25313118)
**24305568 symbols per 0.7822046 second in python
You're diving deep into some fascinating performance comparisons. Python is indeed slower than lower-level languages like C or assembly because it's interpreted and dynamically typed, which adds overhead. That means each operation has more layers to process, leading to those significant slowdowns you noticed.
Assembly and C are way faster than Python because they’re closer to the hardware. Python has more overhead, but unless you're working on something that needs to be super fast, the trade-off is worth it for easier coding.
(Oct-06-2024, 04:10 PM)rohhthone Wrote: [ -> ]So the conclusion of this idiotic demagogy, is python really 140th accent language over processor's asm dialect?

It's a high level dynamic language with an interpreter. We simply do not care, that Python is slower than other static compiled languages. We do not care much about optimization, because the hard stuff is already written in C/C++/Fortran/Rust and is usable as a Python module.

If you want to get the maximum of your CPU, then use static compiled languages or ASM but do not blame Python to be slow.

The why is not easy to answer. It's a combination of global interpreter lock (Single threaded), the dynamic types and the ability to manipulate stack-frames.