3 ms·
It wasn't always that easy in C#, fwiw. > It does not even compete at the only area it's applicable at being back-end or server-side rendering. I'm not sure w
by withinboredom 3y ago
It wasn't always that easy in C#, fwiw.
> It does not even compete at the only area it's applicable at being back-end or server-side rendering.
I'm not sure what you mean here. I've deleted my blog, but I once published benchmarks showing PHP was faster than C# in some cases. I'm currently working on a reimplementation of some C# stuff in PHP and competing with C# quite well.
PHP is written in C; it's quite fast.
- neonsunset 3y agoPHP is an interpreted dynamically typed language. It would always be slower and would always have strict performance ceiling. Given sufficiently competent compilers of similar level of engineering effort, that would always be true. PHP is within the same performance weight category as JavaScript. C# is in the same weight category as Kotlin ad Java, sometimes Rust and C++. It is guaranteed in the same category as Rust and C++ for performance-oriented code (struct generics and spans). To think that an interpreter, where each single instruction is, in the very best case, a computed goto jump with args evaluation, would execute the code faster or comparable to code that is compiled to CPU instructions, is insanity. Even when/if PHP gets JIT compiled, it still has the same language constraints where even something as sophisticated as V8 has to contend with language spec so it cannot optimize away e.g. property access. It might be best to re-evaluate prior assumptions and knowledge which do not correspond to reality.
- withinboredom 3y ago> It might be best to re-evaluate prior assumptions and knowledge which do not correspond to reality. heh, right back at you dude. Opcache JIT is running on an actual CLR just like C#, it can even AOT compile.
- neonsunset 3y ago[flagged]
- withinboredom 3y ago> I suppose mental afflictions come in all shapes and forms. Yes, I suppose some people need proof of things; especially things that aren't that easy to google because it's new and the language has been around since the web's infancy.