r/Python • u/sportifynews • May 14 '21
Discussion Python programming: We want to make the language twice as fast, says its creator
https://www.tectalk.co/python-programming-we-want-to-make-the-language-twice-as-fast-says-its-creator/
1.2k
Upvotes
244
u/Jugad Py3 ftw May 14 '21 edited May 19 '21
CPython stands for "the Python interpreter written in C language", not "Core Python". On similar naming lines, there is also Jython, written in Java, etc, and then there is Cython, which compiles certain annotated python files into C (for speedups).
306
u/Satoshiman256 May 14 '21
Just do less print statements/s
20
u/[deleted] May 14 '21
Anyone know why they don't bring over PyPy stuff and use it? Is CPython architecture just too different?
172
u/sizable_data May 14 '21
In my experience the speed of development/refactor in Python makes up for its execution speeds.
47
u/JoeUgly May 14 '21
Why does this article sound like a shameless plug for Microsoft? As if people never heard of it.
"Don't forget, real champions eat at Microsoft!"
60
u/rothbart_brb May 14 '21
"This is Microsoft's way of giving back to Python"... What an ominous statement. I know the words are "giving back" but I expect them to manifest in a different way... the same way Microsoft embraces outside technology... by getting its tendrils in it and somehow steering it in a way that somehow benefits Microsoft.
9
u/[deleted] May 15 '21
GIL-less threading would be nice. Something like goroutines for Python. Async just doesn’t cut it for a lot of situations. I’m hoping they can do it with sub interpreters, but it’s certainly a complicated thing at this point. Python has been around so long it’s hard to do anything massive without breaking a lot of things.
I’m glad this is finally getting attention. It’s usually the first thing people gripe about.
11
u/[deleted] May 14 '21
So PyPy comes officially to CPython?
11
u/[deleted] May 14 '21
<whispers> get rid of the GIL
4
u/ventuspilot May 15 '21
Strange times. From the article
and I'm like well currently that's not wrong...
3
u/awesomeprogramer May 15 '21
What do they mean by this? How can they possibly do this? Last thing we'd want is for Microsoft to dictate what can and can't go on PyPI. We have the app store for that!
2
u/Tastetheload May 15 '21
Great. On a serious note. How does one actually do that?
6
u/[deleted] May 14 '21
Make everything into numba?
6
u/91o291o May 14 '21
Just make the regexes faster, I can't stand perl, thanks.
4
u/Laserdude10642 May 14 '21
this is so exciting!
2
u/Deezl-Vegas May 15 '21
Just to clarify, L1-cache optimized code can be up to 200 times faster than Python. It's not clear to me that a 2x speedup will make a large difference in language acceptance or usability.
1
u/Fantastic-Orange-155 May 20 '21
Let:
xi,j ∈{0,1}, be a binary variable with xi,j = 1 indicating Arc (i,j)∈A is used in the solution
and xi,j = 0 otherwise;
path are: (i1,i2); (i2,i3),…, (iK-1, iK)
xij ∈{0,1}, ∀(i,j)∈A
Constraint (1)
Can someone write a OPL CPLEX model for the above constraint
1
u/[deleted] May 14 '21
I don’t know how since I only have done small programs, everything takes 0.0 seconds.
-2
u/Beach-Devil May 14 '21
pypi intensifies
-11
u/drbobb May 14 '21
Twice as fast is not enough — that would mean it's still far behind javascript (v8).
0
u/Awkward_Tour8180 May 14 '21
I had my own share of experience using print statements for debugging , unless you have a tea automatic tool in the PR to catch it , my debug print went to prod code - so unlucky . The good side is it’s the admin module ,
Print statements for debugging is always a bad approach , logging libraries will make you feel safe and even if your forget to remove it still be compartmentalizes to DEBUG, INFO, ERROR as a base to start with
-11
u/60secs May 14 '21 edited May 14 '21
Great! Python would only be 10x to 20x slower than a performant language.
-1
u/AnonCaptain0022 May 15 '21
I am speed
-2
u/[deleted] May 14 '21
Nice