3 ms·
Python itself has to become faster. For the love of god. Make it as fast as PHP. My biggest pain point in computer science is that for every project I have to
by TekMol 4y ago
Python itself has to become faster.
For the love of god. Make it as fast as PHP.
My biggest pain point in computer science is that for every project I have to decide to either cope with PHP's butt-ugly namespace system or with Python's masochistic slowness.
Please, Python developers. Take a closer look at how PHP achieves its speed, hold all other development and copy whatever they do!
The result would be heaven.
- anewhnaccount2 4y agoIt is happening: https://github.com/faster-cpython/ideas https://github.com/faster-cpython/ideas
- TekMol 4y agoIt seems to indicate a 30% performance boost? That would be a step into the right direction. 6 more 30% improvements and it is on par with PHP.
- lraxl 4y agoIt will yield a small speedup (< 50%) at best, probably for selected benchmarks that will be widely promoted. Microsoft is misallocating its resources. The scientific ecosystem should be ported to .NET, with first class support for F#.
- machinekob 4y agoThey already try it like 2/3 times and it didnt take off so why should it be different today?
- melony 4y agoEverytime they did it, it was half baked at best. Scientific libraries need driver support, Microsoft always takes the happy path and ignores all the other hardware permutations. If you are not running Intel/Nvidia in a Win32 environment you are out of luck. WSL2, ARM, AMD, etc. don't have much synergy in terms of product support.
- jeremycarter 4y ago.NET would be the perfect ecosystem. And for those who love their dynamic there is support for that too.
- adgjlsfhk1 4y agowould python being 3x faster make a difference? you'd still have so call out to an actually fast language when you want your code to be fast.
- TekMol 4y agoA 3x faster Python would make it about 2x slower than PHP. That is way easier to digest than the current ~5x performance penalty for using it. I would probably not consider PHP anymore if Python was 50% of its speed. I would never consider anything else than Python or PHP for web projects. Developer time is more precious than CPU time.
- peaky_blinder 4y agoYou can have small developer time with other technologies too (JavaScript, Go, Elixir etc) and get some additional benefits compared to PHP. Honestly I don't see the reason to use PHP today unless you have to; 1. Maintain existing PHP codebase 2. Your team only knows PHP
- TekMol 4y agoExcept for speed, PHP has another awesome thing going for it: Statelessness. You throw some PHP files on a server and have a working web application. As soon as you change a PHP file, the change is in effect on next reload of the page. You might be able to do the same in Python, but everybody in Python world is doing the long running thread approach, so you would be on uncharted territory.
- rowanG077 4y agoIf you want to optimize for developer time you should look at statically typed languages with rich type systems that have little overhead.
- cardanome 4y agoWait, you are using PHP for scientific computing? I would love to hear more about that part. That could actually work out nicely with the right libraries, just haven't yet heard of anyone doing that. I think Python is inherently difficult to optimize because it allows some dynamic trickery that PHP does not. Additionally being large and complex does not help. You can't really pull an LuaJit equivalent. There sure are still many quick wins to be made for Python performance but not sure if it will ever compete with PHP/Lua/Julia and others on the performance front.
- pbowyer 4y ago> Wait, you are using PHP for scientific computing? I would love to hear more about that part. Not OP but I wish PHP was usable for scientific computing. If I had better C/Rust/PHP internals insane macro skills I would integrate a dataframe library (Pola.rs?) into PHP to give us the basics for manipulating data. Plenty more to add after that for matrix multiplication and the rest but I haven't thought that far ahead!
- quietbritishjim 4y ago> ... for every project I have to decide to either cope with PHP's butt-ugly namespace system or with Python's masochistic slowness. Good news: there are more than two programming languages! But seriously, what situation are you in where your only choices are Python and PHP?