3 ms·
Must be a funny comparison group you have there.
by expression 10y ago
Must be a funny comparison group you have there.
- cocotino 10y agoI'm certainly positive it's faster than Ruby, Python and Java.
- geon 10y agoRuby and python aren't exactly known to be fast. In my experience php is fast enough until you start generating lots of garbage. It seems it wasn't really designed to garbage collect at all, but to rely on the per-request cleanup.
- cyphar 10y ago> until you start generating lots of garbage We should really stop pretending that the garbage collector is the problem with langauges. The collector isn't the problem, your garbage is the problem. [Not that I'm a proponent of PHP, though it does make popping shells far more fun.]
- geon 10y agoThe code becomes kind of weird when you have to second guess the language. Now, the approach PHP takes is fine for the original vision of the language. It even works great. But languages designed for long running processes often have some sort of mechanism for dealing with that situation explicitly. Like the `NSAutoreleasePool` in Objective C. In C++ you might build your own custom slab allocator. I'd say the garbage collector is one of the problems with PHP. Then again, if you run into it, PHP might not be the right tool for that particular job.
- smt88 10y agoIt depends on the code base and use case. For the vast majority of coders, the time/cost savings will be in the usability of the language itself rather than the hardware required to run the code.