The only possible downside expressed so far is the possibility of a slightly larger Python package
Announcement
Collapse
No announcement yet.
Fedora 41 Looks To "-O3" Optimizations For Its Python Build
Collapse
X
-
Originally posted by piotrj3 View Post
There is a lot of use cases when benefits of python heavy outweights performance issue. Example : webrowser integration tests. Realistically speaking good selenium/playwright etc. bindings have 4 languages : Java, C#, Python and JS. There are some lesser known but often they are not well maintained and have problems.
Java, C# force you to write a ton of boiler plate, when you debug and make small change instead of instantly testing change you want it to recompile, rerun what takes time.
JS - let's be honest JS is not good language. And stuff like TS and some stuff still needs building step.
Python - you don't write boiler plate, you don't wait for things to build, entire ecosystem is simple and in my expierience dependency selenium requires less often updates than for java.
I am not doing integration tests for a while but when i asked any tester who did those and tried python always prefered python over competition. 99% of performance lies in webrowser itself that python doesn't affect.
Now if you think of Linux distros, Python is more often used for actual production apps, not for testing. Plugins for bigger applications, full GUI apps written in Python. Some of those make sense, some don't.
Comment
-
Originally posted by amity View Post
I'm not sure about that... I have personally seen -O3 introduce some VERY strange bugs in many programs.
- Likes 1
Comment
-
-
Originally posted by kylew77 View Post
YEP! That is what I was taught in my BS in CS program. Prototype in Python or Perl then implement the final program in C. It just seems no one knows how to write C any more.
Prototype in Python, release, profit.
And, C isn't all that great for everything. Sure you CAN do everything, but you really shouldn't. There is no point reimplementing internal tooling in c, for example
- Likes 3
Comment
-
Originally posted by CommunityMember View Post
As mentioned in the proposal, Python itself uses -O3 for it's various CI/QA testing, so while it is very true every compiler version has it's own set of bugs, -O3 has been extensively tested with/by Python. While in the early days of gcc -O3 had some issues, it now is considered (by the gcc team) to be a good choice for most (as with any optimization, sometimes the code actually gets slower). Where -O3 is known to generate interesting results is where the code depends on a certain implementation of what is undefined behavior in C. Various code analysis tools (and gcc itself) now better report such undefined behavior cases allowing them to be fixed.
That being said in recent versions of GCC auto-vectorization is on with -O2 so some of the gains that you used to get from -O3 are present in -O2 now.Last edited by Noitatsidem; 14 April 2024, 03:00 PM.
Comment
-
Originally posted by CommunityMember View Post
As mentioned in the proposal, Python itself uses -O3 for it's various CI/QA testing, so while it is very true every compiler version has it's own set of bugs, -O3 has been extensively tested with/by Python. While in the early days of gcc -O3 had some issues, it now is considered (by the gcc team) to be a good choice for most (as with any optimization, sometimes the code actually gets slower). Where -O3 is known to generate interesting results is where the code depends on a certain implementation of what is undefined behavior in C. Various code analysis tools (and gcc itself) now better report such undefined behavior cases allowing them to be fixed.
Comment
-
Originally posted by amity View Post
I understand what you're saying and I agree that *should* be the case, but I and some others have absolutely continued to see strange behavior with -O3 (outside of using undefined behavior) across several different projects even in newer gcc versions like 11/12/13...
Comment
Comment